From: Hauke Zuehl Date: Sat, 16 Jun 2012 13:07:23 +0000 (+0200) Subject: Check if $rr exists X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1231dd72f02fdec59b78ed9a6408887c2ae0b8d4;p=friendica.git Check if $rr exists --- diff --git a/include/config.php b/include/config.php index df1070c13c..60cd00cf64 100644 --- a/include/config.php +++ b/include/config.php @@ -18,9 +18,7 @@ if(! function_exists('load_config')) { function load_config($family) { global $a; - $r = q("SELECT * FROM `config` WHERE `cat` = '%s'", - dbesc($family) - ); + $r = q("SELECT * FROM `config` WHERE `cat` = '%s'", dbesc($family)); if(count($r)) { foreach($r as $rr) { $k = $rr['k']; @@ -30,7 +28,7 @@ function load_config($family) { $a->config[$family][$k] = $rr['v']; } } - } else if ($rr['cat'] != 'config') { + } else if (isset($rr) && ($rr['cat'] != 'config')) { // Negative caching $a->config[$family] = "!!"; }