-
-
Notifications
You must be signed in to change notification settings - Fork 803
Open
Description
If you try to start() Madelineproto in a closure instead of regular file you'll get a startup exception in Magic.php:255
self::$script_cwd = self::$cwd = \dirname(end($backtrace)['file']);
because closures don't have "file" value in returned debug_backtrace() array but in "function":
Array
(
[0] => Array
(
[function] => {closure:/app/test.php:35}
[args] => Array
(
)
)
)
Furthermore, these two lines in the same file should be removed as well:
set_error_handler(Exception::exceptionErrorHandler(...));
set_exception_handler(Exception::exceptionHandler(...));
It is very bad practice and anti-pattern to modify exception handling routines inside the library if it's not strictly required by library itself.
Metadata
Metadata
Assignees
Labels
No labels