Browse Source

Merge pull request #5539 from mockey/php-exception-handler

[php] print error message to stdout since there is problem with printing to stderr in a CGI env
Andy Li 9 years ago
parent
commit
1cb265bdba
1 changed files with 2 additions and 2 deletions
  1. 2 2
      std/php/Boot.hx

+ 2 - 2
std/php/Boot.hx

@@ -344,9 +344,9 @@ function _hx_exception_handler($e) {
 		$i = $GLOBALS['%s']->length;
 		while(--$i >= 0)
 			$stack .= 'Called from '.$GLOBALS['%s'][$i].$nl;
-		fwrite(STDERR, $pre.'uncaught exception: '.$msg.$nl.$nl.$stack.$post.'\n');
+		echo $pre.'uncaught exception: '.$msg.$nl.$nl.$stack.$post;
 	} else
-		fwrite(STDERR, $pre.'uncaught exception: '.$msg.$nl.$nl.'in file: '.$e->getFile().' line '.$e->getLine().$nl.$e->getTraceAsString().$post.'\n');
+		echo $pre.'uncaught exception: '.$msg.$nl.$nl.'in file: '.$e->getFile().' line '.$e->getLine().$nl.$e->getTraceAsString().$post;
 	exit(1);
 }