Browse Source

[Php] respect error_reporting configuration (fixed issue #1625)

Simon Krajewski 12 years ago
parent
commit
4c3ee16537
1 changed files with 3 additions and 0 deletions
  1. 3 0
      std/php/Boot.hx

+ 3 - 0
std/php/Boot.hx

@@ -283,6 +283,9 @@ function _hx_mod($x, $y) {
 }
 
 function _hx_error_handler($errno, $errmsg, $filename, $linenum, $vars) {
+	if (!(error_reporting() & $errno)) {
+		return false;
+	}
 	$msg = $errmsg . ' (errno: ' . $errno . ') in ' . $filename . ' at line #' . $linenum;
 	$e = new HException($msg, $errmsg, $errno, _hx_anonymous(array('fileName' => 'Boot.hx', 'lineNumber' => __LINE__, 'className' => 'php.Boot', 'methodName' => '_hx_error_handler')));
 	$e->setFile($filename);