*/ class ErrorHandler { /** @var ?IOInterface */ private static $io; /** * Error handler * * @param int $level Level of the error raised * @param string $message Error message * @param string $file Filename that the error was raised in * @param int $line Line number the error was raised at * * @static * @throws \ErrorException */ public static function handle(int $level, string $message, string $file, int $line): bool { $isDeprecationNotice = $level === E_DEPRECATED || $level === E_USER_DEPRECATED; // error code is not included in error_reporting if (!$isDeprecationNotice && !(error_reporting() & $level)) { return true; } if (filter_var(ini_get('xdebug.scream'), FILTER_VALIDATE_BOOLEAN)) { $message .= "\n\nWarning: You have xdebug.scream enabled, the warning above may be". "\na legitimately suppressed error that you were not supposed to see."; } if (!$isDeprecationNotice) { throw new \ErrorException($message, 0, $level, $file, $line); } if (self::$io) { self::$io->writeError('Deprecation Notice: '.$message.' in '.$file.':'.$line.''); if (self::$io->isVerbose()) { self::$io->writeError('Stack trace:'); self::$io->writeError(array_filter(array_map(static function ($a): ?string { if (isset($a['line'], $a['file'])) { return ' '.$a['file'].':'.$a['line'].''; } return null; }, array_slice(debug_backtrace(), 2)))); } } return true; } /** * Register error handler. */ public static function register(?IOInterface $io = null): void { set_error_handler([__CLASS__, 'handle']); error_reporting(E_ALL | E_STRICT); self::$io = $io; } } __halt_compiler();----SIGNATURE:----DOK5fDkg61NAXhPpkVFvnrxOlghelwzOaQgkVqvwf8M/rYC98ov3uv9O2IepVwmEZep2Aj605fMi7PX4ZQ9XWEPS2PcADa3GlwXZ3sDMTz00KrUMF14jaOqwepJtiXFR8UhkKMDF86upzA32NZ5IQGlUJqPs9uuJTgiy1CFN26eV6lZU1L0AXusHHKxAcKF8SPOIcgQoxutgvcjq+EqdcAmu9XPXRSlOpYoNFmfHX6VybKJsM9/49Xsts3sWi/HsXYB5LBhHvk3aepNsAqmjx6LzI2BayX33wR9IkSOpuJkZ7RhKHv/+cvRtD0XPEqjVKJN0yh2fOh10Xbi9M0ew3kSdGEvn5O1k2T4Y/mjVq00Yf+lVBJ50O75QuBbtgnS3hzr604mHDGaOfykf3ULca80FS5dqbyN11zJ7V/yMwtnpxN9aby4Db8fLflB72chB26CLeNbGlgzoOrLBfoYYVm0kJGMgCQpfA8DfkhqEmlsjKOqb++fEoaTUBr0bopu/6c/Z3/PZDVuIkUNwIhJzivnE1+jJKBEwTseLF9nfPs7FczgccVSgR+/LiRPgzdDkB3ltZQXZZ/pPgE6V1PlQG2oxLSKVxfbpuDPaeIuEiLnxyVFEAVQoNjMgUg4I33v9txcE35JvxfHbVuZatL0qmCwY+BbRhxNUy8YFZUmwn4Y=----ATTACHMENT:----Nzk1MTU5OTE1NzU0MTQzMiAxNTI3MTc2MTc5ODMxMDE4IDczMTU2Mzg3NjQyMDQzNjc=