X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fdbm.php;h=812989072b7232aacd7d5e0d10f0dd444ca25ef3;hb=fd3cf1cd02b57e9796e5537dbee468d1c8048a48;hp=7c8c9b8c145ebd1e709cdcad4892ec696978e43c;hpb=2e9d233367068fceac8005126d14a2002539c772;p=friendica.git diff --git a/include/dbm.php b/include/dbm.php index 7c8c9b8c14..812989072b 100644 --- a/include/dbm.php +++ b/include/dbm.php @@ -20,8 +20,8 @@ class dbm { foreach ($r AS $process) { $state = trim($process["State"]); - // Filter out all idle processes - if (!in_array($state, array("", "init", "statistics"))) { + // Filter out all non blocking processes + if (!in_array($state, array("", "init", "statistics", "updating"))) { ++$states[$state]; ++$processes; } @@ -42,7 +42,11 @@ class dbm { * @param $array mixed A filled array with at least one entry * @return Whether $array is a filled array */ - public function is_result($array) { + public static function is_result($array) { + // It could be a return value from an update statement + if (is_bool($array)) + return $array; + return (is_array($array) && count($array) > 0); } }