aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/elgglib.php
diff options
context:
space:
mode:
authorSteve Clay <steve@mrclay.org>2012-04-17 23:33:20 -0300
committerSteve Clay <steve@mrclay.org>2012-04-20 09:30:26 -0400
commite3b0662aec78a46357843d0f88e385d488ceba4a (patch)
tree184eb29038b5bcfeeb6938bb3298f863eb6eff79 /engine/lib/elgglib.php
parentf2a80038cddec5ed86b3dd9edb31cf07e3376de8 (diff)
downloadelgg-e3b0662aec78a46357843d0f88e385d488ceba4a.tar.gz
elgg-e3b0662aec78a46357843d0f88e385d488ceba4a.tar.bz2
Fixes #4447: Error handler takes type hint violations seriously
Diffstat (limited to 'engine/lib/elgglib.php')
-rw-r--r--engine/lib/elgglib.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 11bdc7285..616d4d4cf 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -1053,12 +1053,14 @@ function _elgg_php_exception_handler($exception) {
*
* @return true
* @access private
+ * @todo Replace error_log calls with elgg_log calls.
*/
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:
+ case E_RECOVERABLE_ERROR: // (e.g. type hint violation)
error_log("PHP ERROR: $error");
register_error("ERROR: $error");
@@ -1092,8 +1094,8 @@ function _elgg_php_error_handler($errno, $errmsg, $filename, $linenum, $vars) {
*
* @note No messages will be displayed unless debugging has been enabled.
*
- * @param str $message User message
- * @param str $level NOTICE | WARNING | ERROR | DEBUG
+ * @param string $message User message
+ * @param string $level NOTICE | WARNING | ERROR | DEBUG
*
* @return bool
* @since 1.7.0