mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-23 04:51:13 +01:00
Further improvement
This commit is contained in:
parent
6e3fe54954
commit
5969ebe783
@ -83,15 +83,15 @@ class Exception extends \Exception
|
|||||||
*/
|
*/
|
||||||
public static function exceptionErrorHandler($errno = 0, $errstr = null, $errfile = null, $errline = null): bool
|
public static function exceptionErrorHandler($errno = 0, $errstr = null, $errfile = null, $errline = null): bool
|
||||||
{
|
{
|
||||||
$errfile = \str_replace('phabel.transpiler'.PHP_MAJOR_VERSION.PHP_MINOR_VERSION, '', $errfile ?? '');
|
$errfileReplaced = \str_replace('phabel.transpiler'.PHP_MAJOR_VERSION.PHP_MINOR_VERSION.':', '', $errfile ?? '');
|
||||||
// If error is suppressed with @, don't throw an exception
|
// If error is suppressed with @, don't throw an exception
|
||||||
if (\error_reporting() === 0
|
if (\error_reporting() === 0
|
||||||
|| \strpos($errstr, 'headers already sent')
|
|| \strpos($errstr, 'headers already sent')
|
||||||
|| \strpos($errstr, 'Creation of dynamic property') !== false
|
|| \strpos($errstr, 'Creation of dynamic property') !== false
|
||||||
|| $errfile && (
|
|| $errfileReplaced && (
|
||||||
\strpos($errfile, DIRECTORY_SEPARATOR.'amphp'.DIRECTORY_SEPARATOR) !== false
|
\strpos($errfileReplaced, DIRECTORY_SEPARATOR.'amphp'.DIRECTORY_SEPARATOR) !== false
|
||||||
|| \strpos($errfile, DIRECTORY_SEPARATOR.'league'.DIRECTORY_SEPARATOR) !== false
|
|| \strpos($errfileReplaced, DIRECTORY_SEPARATOR.'league'.DIRECTORY_SEPARATOR) !== false
|
||||||
|| \strpos($errfile, DIRECTORY_SEPARATOR.'phpseclib'.DIRECTORY_SEPARATOR) !== false
|
|| \strpos($errfileReplaced, DIRECTORY_SEPARATOR.'phpseclib'.DIRECTORY_SEPARATOR) !== false
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user