Revision 889e9655185213fc4acd56c6000f6b94e76cc2f8
Committed on 27/02/2019 8:35 am by
Gasol Wu <[email protected]> [GitHub Diff]
Fix bad exit status 255 generated by uncaught TypeError
The error_get_last function returns NULL if there hasn't been an error
yet, And the exit status 255 is reserved by PHP and shall be used when fatal
error occurred.
PHP Fatal error: Uncaught TypeError: Return value of TheSeer\phpDox\ErrorHandler::getLastError() must be of the type array,
null returned in /net/enterprise-data1/home/ad min/gasolwu/Code/phpdox/src/shared/ErrorHandler.php:147
Stack trace:
#0 /net/enterprise-data1/home/admin/gasolwu/Code/phpdox/src/shared/ErrorHandler.php(55): TheSeer\phpDox\ErrorHandler->getLastError()
#1 [internal function]: TheSeer\phpDox\ErrorHandler->handleShutdown()
#2 {main}
thrown in /net/enterprise-data1/home/admin/gasolwu/Code/phpdox/src/shared/ErrorHandler.php on line 147
References:
- https://secure.php.net/exit
- https://secure.php.net/error_get_last