diff options
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/elgglib.php | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index f7b71268a..8c187ef8b 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -189,7 +189,7 @@ */
function page_draw($title, $body) {
- return elgg_view('pageshell', array(
+ return elgg_view('pageshells/pageshell', array(
'title' => $title,
'body' => $body,
'sysmessages' => system_messages(null,"")
@@ -447,43 +447,43 @@ /**
* Error handling
*/
- - /** - * PHP Error handler function. - * This function acts as a wrapper to catch and report PHP error messages. - * - * @see http://www.php.net/set-error-handler - * @param int $errno The level of the error raised - * @param string $errmsg The error message - * @param string $filename The filename the error was raised in - * @param int $linenum The line number the error was raised at - * @param array $vars An array that points to the active symbol table at the point that the error occurred - */ - function __elgg_php_error_handler($errno, $errmsg, $filename, $linenum, $vars) - { - $error = date("Y-m-d H:i:s (T)") . ": \"" . $errmsg . "\" in file " . $filename . " (line " . $linenum . ")"; - - switch ($errno) { - case E_USER_ERROR: - error_log("ERROR: " . $error); - register_error("ERROR: " . $error); - - // Since this is a fatal error, we want to stop any further execution but do so gracefully. - throw new Exception("ERROR: " . $error); - break; - - case E_WARNING : - case E_USER_WARNING : - error_log("WARNING: " . $error); - // register_error("WARNING: " . $error); - break; - - default: - error_log("DEBUG: " . $error); - // register_error("DEBUG: " . $error); +
+ /**
+ * PHP Error handler function.
+ * This function acts as a wrapper to catch and report PHP error messages.
+ *
+ * @see http://www.php.net/set-error-handler
+ * @param int $errno The level of the error raised
+ * @param string $errmsg The error message
+ * @param string $filename The filename the error was raised in
+ * @param int $linenum The line number the error was raised at
+ * @param array $vars An array that points to the active symbol table at the point that the error occurred
+ */
+ function __elgg_php_error_handler($errno, $errmsg, $filename, $linenum, $vars)
+ {
+ $error = date("Y-m-d H:i:s (T)") . ": \"" . $errmsg . "\" in file " . $filename . " (line " . $linenum . ")";
+
+ switch ($errno) {
+ case E_USER_ERROR:
+ error_log("ERROR: " . $error);
+ register_error("ERROR: " . $error);
+
+ // Since this is a fatal error, we want to stop any further execution but do so gracefully.
+ throw new Exception("ERROR: " . $error);
+ break;
+
+ case E_WARNING :
+ case E_USER_WARNING :
+ error_log("WARNING: " . $error);
+ // register_error("WARNING: " . $error);
+ break;
+
+ default:
+ error_log("DEBUG: " . $error);
+ // register_error("DEBUG: " . $error);
}
- return true; + return true;
}
/**
@@ -495,12 +495,12 @@ */
function __elgg_php_exception_handler($exception) {
- - error_log("*** FATAL EXCEPTION *** : " . $exception); +
+ error_log("*** FATAL EXCEPTION *** : " . $exception);
$body = elgg_view("messages/exceptions/exception",array('object' => $exception));
echo page_draw("We've encountered a problem.", $body);
- } + }
?>
\ No newline at end of file |