aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-04-15 12:51:34 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-04-15 12:51:34 +0000
commitc7faf4267485395917c7bbb44a351befff0fdeaf (patch)
tree793c9280999702ca650f7eec04bc467ba6fb7c2b
parent26a6635afa656c3fa081202d9857a21d20550b51 (diff)
downloadelgg-c7faf4267485395917c7bbb44a351befff0fdeaf.tar.gz
elgg-c7faf4267485395917c7bbb44a351befff0fdeaf.tar.bz2
Error logged on page forward due to missing page owner.
git-svn-id: https://code.elgg.org/elgg/trunk@3209 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/pageowner.php9
-rw-r--r--languages/en.php4
2 files changed, 11 insertions, 2 deletions
diff --git a/engine/lib/pageowner.php b/engine/lib/pageowner.php
index c2b98c284..f4a4234fb 100644
--- a/engine/lib/pageowner.php
+++ b/engine/lib/pageowner.php
@@ -67,7 +67,14 @@
* a page does after calling this function is to retrieve the owner entity - which is of course cashed.
*/
$owner_entity = get_entity($returnval);
- if (!$owner_entity) forward();
+ if (!$owner_entity) {
+
+ // Log an error
+ error_log(sprintf(elgg_echo('pageownerunavailable'), $returnval));
+
+ // Forward
+ forward();
+ }
return $returnval;
}
diff --git a/languages/en.php b/languages/en.php
index df94470f7..53b26ba7d 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -166,7 +166,9 @@
'memcache:versiontoolow' => 'Memcache needs at least version %s to run, you are running %s',
'memcache:noaddserver' => 'Multiple server support disabled, you may need to upgrade your PECL memcache library',
- 'deprecatedfunction' => 'Warning: This code uses the deprecated function \'%s\' and is not compatible with this version of Elgg',
+ 'deprecatedfunction' => 'Warning: This code uses the deprecated function \'%s\' and is not compatible with this version of Elgg',
+
+ 'pageownerunavailable' => 'Warning: The page owner %d is not accessible!',
/**
* API
*/