aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/PConfig.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-10-17 21:03:34 -0700
committerzotlabs <mike@macgirvin.com>2016-10-17 21:03:34 -0700
commit437aa168d136db2c782ed2b366e411721f5f605c (patch)
tree6d4f6d479f3e2f2fcd95b9e920ca866c4a08c9cb /Zotlabs/Lib/PConfig.php
parentf31ef3420db5ed600a988dc300f2d2f56b31acc6 (diff)
downloadvolse-hubzilla-437aa168d136db2c782ed2b366e411721f5f605c.tar.gz
volse-hubzilla-437aa168d136db2c782ed2b366e411721f5f605c.tar.bz2
volse-hubzilla-437aa168d136db2c782ed2b366e411721f5f605c.zip
array_key_exists warning on PConfig::Delete()
Diffstat (limited to 'Zotlabs/Lib/PConfig.php')
-rw-r--r--Zotlabs/Lib/PConfig.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/Zotlabs/Lib/PConfig.php b/Zotlabs/Lib/PConfig.php
index a481667a5..7e29ef8de 100644
--- a/Zotlabs/Lib/PConfig.php
+++ b/Zotlabs/Lib/PConfig.php
@@ -185,13 +185,16 @@ class PConfig {
$ret = false;
- if(array_key_exists($key, \App::$config[$uid][$family]))
+ if(array_key_exists($uid,\App::$config)
+ && array_key_exists($family,\App::$config['uid'])
+ && array_key_exists($key, \App::$config[$uid][$family]))
unset(\App::$config[$uid][$family][$key]);
- $ret = q("DELETE FROM pconfig WHERE uid = %d AND cat = '%s' AND k = '%s'",
- intval($uid),
- dbesc($family),
- dbesc($key)
- );
+
+ $ret = q("DELETE FROM pconfig WHERE uid = %d AND cat = '%s' AND k = '%s'",
+ intval($uid),
+ dbesc($family),
+ dbesc($key)
+ );
return $ret;
}