Commit dc603b15 authored by bcosca's avatar bcosca
Browse files

Allow unload() to call default fatal error handler if UNLOAD returns FALSE

parent 8fd15121
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -1394,10 +1394,9 @@ final class Base {
	*	@return NULL
	**/
	function unload() {
		if (isset($this->hive['UNLOAD']))
			$this->hive['UNLOAD']($this);
		elseif (($error=error_get_last()) &&
			in_array($error['type'],
		$handler=$this->hive['UNLOAD'];
		if ((!$handler || $this->call($handler,$this)===FALSE) &&
			($error=error_get_last()) && in_array($error['type'],
			array(E_ERROR,E_PARSE,E_CORE_ERROR,E_COMPILE_ERROR)))
			// Fatal error detected
			$this->error(500,sprintf(self::E_Fatal,$error['message']),