Commit 3fd45c62 authored by Tim Schoondergang's avatar Tim Schoondergang
Browse files

eerste poging

parent bbc25587
Pipeline #7593 failed with stage
in 16 seconds
......@@ -94,14 +94,14 @@ class DB
/**
* Created DB connection
*
* @var \mysqli|null
* @var \mysqli
*/
protected static $mlink;
/**
* Created DBwrite connection
*
* @var \mysqli|null
* @var \mysqli
*/
protected static $mlinkWrite;
......@@ -1105,10 +1105,12 @@ class DB
{
if (self::$wsrepSupport) {
try {
if ($on) {
mysqli_query(self::$mlink, "SET SESSION wsrep_sync_wait = 1;");
} else {
mysqli_query(self::$mlink, "SET SESSION wsrep_sync_wait = 0;");
if (isset(self::$mlink)) {
if ($on) {
mysqli_query(self::$mlink, "SET SESSION wsrep_sync_wait = 1;");
} else {
mysqli_query(self::$mlink, "SET SESSION wsrep_sync_wait = 0;");
}
}
} catch (\Exception $ex) {
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment