diff --git a/include/Core/Config.php b/include/Core/Config.php index 5235728864..7b7045a9ee 100644 --- a/include/Core/Config.php +++ b/include/Core/Config.php @@ -97,7 +97,7 @@ class Config { dbesc($family), dbesc($key) ); - if (dbm::is_result($ret)) { + if (count($ret)) { // manage array value $val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret[0]['v'])?unserialize( $ret[0]['v']):$ret[0]['v']); $a->config[$family][$key] = $val; diff --git a/include/Core/PConfig.php b/include/Core/PConfig.php index 49b69a1f7a..43735018e4 100644 --- a/include/Core/PConfig.php +++ b/include/Core/PConfig.php @@ -92,7 +92,7 @@ class PConfig { dbesc($key) ); - if (dbm::is_result($ret)) { + if (count($ret)) { $val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret[0]['v'])?unserialize( $ret[0]['v']):$ret[0]['v']); $a->config[$uid][$family][$key] = $val;