Seems i found some bug in to php7.0.3 but i'm not sure probably issue is at my side so i decided to write here first
i have recently updated my server php version to to php7.0.3, and of course there was errors about deprecated method etc i was fixing them one by one till i come to this one
Uncaught TypeError: Argument 1 passed to Debug::_exceptionHandler() must be an instance of Exception, instance of Error given in SomePath\Debug.php:518 Stack trace: #0 [internal function]: Debug::_exceptionHandler(Object(Error)) #1 {main} thrown
i checked Debug class and found there set_exception_handler and set_error_handler calls in function enable()
public static function enable( ..some params.. ){
...
set_exception_handler(array(__CLASS__, '_exceptionHandler'));
set_error_handler(array(__CLASS__, '_errorHandler'));
}
// where _exceptionHandler function defined as
public static function _exceptionHandler(Exception $exception)
{ ... }
// and _errorHandler defined as
public static function _errorHandler($severity, $message, $file, $line, $context)
{ ... }
Actually error is clear for me it tells that it can't pass Error type object to _exceptionHandler as it excepts Exception type, but the Question is Why it trying to pass it to _exceptionHandler instead _errorHandler as it also defined ? is it bug or i'm missing something in definition of error and exception handlers ?
Note: i tried to play with set_error_handler pass it as second argument E_ALL etc but noting helps...
I also got error which was thrown and should be handled by _errorHandler but instead handled by _exceptionHandler was
Uncaught Error: Call to undefined function set_magic_quotes_runtime() in SomePath...
Can someone help me with this ?
Thanks