aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-07-21 20:50:39 -0700
committerredmatrix <git@macgirvin.com>2016-07-21 20:50:39 -0700
commit0c3d5e99a299fb51a63f51d2e8b9117590b717f7 (patch)
tree8bb367ab5a9738ba91c285dadbf2bc3133263b78 /Zotlabs/Lib
parentbc46f70a90a25cc3f4395c1badfec6aad351589f (diff)
downloadvolse-hubzilla-0c3d5e99a299fb51a63f51d2e8b9117590b717f7.tar.gz
volse-hubzilla-0c3d5e99a299fb51a63f51d2e8b9117590b717f7.tar.bz2
volse-hubzilla-0c3d5e99a299fb51a63f51d2e8b9117590b717f7.zip
PConfig : Check for is_null($uid) as well as false. We actually allow $uid = 0 though it shouldn't normally happen.
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r--Zotlabs/Lib/PConfig.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/Zotlabs/Lib/PConfig.php b/Zotlabs/Lib/PConfig.php
index 195321375..319b8f203 100644
--- a/Zotlabs/Lib/PConfig.php
+++ b/Zotlabs/Lib/PConfig.php
@@ -17,7 +17,7 @@ class PConfig {
*/
static public function Load($uid) {
- if($uid === false)
+ if(is_null($uid) || $uid === false)
return false;
if(! array_key_exists($uid, \App::$config))
@@ -61,7 +61,7 @@ class PConfig {
static public function Get($uid,$family,$key,$instore = false) {
- if($uid === false)
+ if(is_null($uid) || $uid === false)
return false;
if(! array_key_exists($uid, \App::$config))
@@ -102,7 +102,7 @@ class PConfig {
// we provide a function backtrace in the logs so that we can find
// and fix the calling function.
- if($uid === false) {
+ if(is_null($uid) || $uid === false) {
btlogger('UID is FALSE!', LOGGER_NORMAL, LOG_ERR);
return;
}
@@ -172,6 +172,9 @@ class PConfig {
static public function Delete($uid, $family, $key) {
+ if(is_null($uid) || $uid === false)
+ return false;
+
$ret = false;
if(array_key_exists($key, \App::$config[$uid][$family]))