aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/pageowner.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-07 16:42:33 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-07 16:42:33 +0000
commit4af8915edaa0e25d651b819590c802b18ea1fb67 (patch)
tree603ea6013d65bde8fb023d457e4df3bebc2560e1 /engine/lib/pageowner.php
parent0af698606f32a4fbee1d654dd8fe9135886888e9 (diff)
downloadelgg-4af8915edaa0e25d651b819590c802b18ea1fb67.tar.gz
elgg-4af8915edaa0e25d651b819590c802b18ea1fb67.tar.bz2
Refs #174: Introducing the ElggDummy class which returns false for all methods and set variables called on it. This is what the logged out $_SESSION['user'] is set to and is also what page_owner_entity will return if page_owner is invalid.
This means that calls to things like $_SESSION['user']->getGUID() are now safe and will no longer cause a parsing error. Please report any issues. git-svn-id: https://code.elgg.org/elgg/trunk@1770 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/pageowner.php')
-rw-r--r--engine/lib/pageowner.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/engine/lib/pageowner.php b/engine/lib/pageowner.php
index 3f867e750..46394c8c9 100644
--- a/engine/lib/pageowner.php
+++ b/engine/lib/pageowner.php
@@ -67,8 +67,8 @@
if ($page_owner > 0)
return get_entity($page_owner);
- return false;
-
+ //return false;
+ return new ElggDummy();
}
/**