diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-11-12 02:18:48 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-11-12 02:18:48 +0000 |
commit | 307d8c9d5c0568c4294487d26c25450968ed28cf (patch) | |
tree | eb71113f541ba0524ab0eed144ddc249f75549b4 /engine | |
parent | 868c5c7aa1cccb55a3c64aa463dbcd343b5273d6 (diff) | |
download | elgg-307d8c9d5c0568c4294487d26c25450968ed28cf.tar.gz elgg-307d8c9d5c0568c4294487d26c25450968ed28cf.tar.bz2 |
fixes #1286 - ElggPlugin get() wasn't handling "0" and returning null instead
git-svn-id: http://code.elgg.org/elgg/trunk@3669 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/plugins.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php index be604606e..1e0a683c2 100644 --- a/engine/lib/plugins.php +++ b/engine/lib/plugins.php @@ -49,13 +49,15 @@ class ElggPlugin extends ElggObject { } // No, so see if its in the private data store. + // get_private_setting() returns false if it doesn't exist $meta = get_private_setting($this->guid, $name); - if ($meta) { - return $meta; - } - // Can't find it, so return null - return null; + if ($meta === false) { + // Can't find it, so return null + return NULL; + } + + return $meta; } /** |