diff options
author | zotlabs <mike@macgirvin.com> | 2016-10-17 21:03:34 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2016-10-17 21:03:34 -0700 |
commit | 437aa168d136db2c782ed2b366e411721f5f605c (patch) | |
tree | 6d4f6d479f3e2f2fcd95b9e920ca866c4a08c9cb /Zotlabs/Lib | |
parent | f31ef3420db5ed600a988dc300f2d2f56b31acc6 (diff) | |
download | volse-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')
-rw-r--r-- | Zotlabs/Lib/PConfig.php | 15 |
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; } |