diff options
-rw-r--r-- | engine/lib/pageowner.php | 9 | ||||
-rw-r--r-- | languages/en.php | 4 |
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
*/
|