]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #4447: Error handler takes type hint violations seriously
authorSteve Clay <steve@mrclay.org>
Wed, 18 Apr 2012 02:33:20 +0000 (23:33 -0300)
committerSteve Clay <steve@mrclay.org>
Fri, 20 Apr 2012 13:30:26 +0000 (09:30 -0400)
engine/lib/elgglib.php

index 11bdc7285bdd70890eacb175f41cd65fc038a18b..616d4d4cf2b69956e7544234b1ca4b67d7075723 100644 (file)
@@ -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