Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/Exceptions/AbstractSafeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ abstract class AbstractSafeException extends \ErrorException implements SafeExce
public static function createFromPhpError(): self
{
$error = error_get_last();

if ($error === null) {
return new static();
}

return new static($error['message'], 0, $error['type']);
}
Expand Down