mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-01 11:39:41 +08:00
Fix #20282: Fix compatibility with PHP 8.4: deprecated constant E_STRICT
This commit is contained in:
committed by
GitHub
parent
80f2545cf1
commit
5df412df2c
@ -13,6 +13,7 @@ Yii Framework 2 Change Log
|
||||
- Enh #20268: Minor optimisation in `\yii\helpers\BaseArrayHelper::map` (chriscpty)
|
||||
- Enh #20273: Remove unnecessary `paragonie/random_compat` dependency (timwolla)
|
||||
- Chg #20276: Removed autogenerated migration phpdoc (userator)
|
||||
- Bug #20282: Fix compatibility with PHP 8.4: deprecated constant E_STRICT (Izumi-kun)
|
||||
- Bug #20284: Revert punycode to 1.4.x which supports pre ES6 format (mtangoo)
|
||||
- New #20279: Add to the `\yii\web\Request` CSRF validation by custom HTTP header (olegbaturin)
|
||||
- Enh #20279: Add to the `\yii\web\Request` `csrfHeader` property to configure a custom HTTP header for CSRF validation (olegbaturin)
|
||||
|
||||
@ -124,15 +124,14 @@ class ErrorException extends \ErrorException
|
||||
E_NOTICE => 'PHP Notice',
|
||||
E_PARSE => 'PHP Parse Error',
|
||||
E_RECOVERABLE_ERROR => 'PHP Recoverable Error',
|
||||
E_STRICT => 'PHP Strict Warning',
|
||||
E_USER_DEPRECATED => 'PHP User Deprecated Warning',
|
||||
E_USER_ERROR => 'PHP User Error',
|
||||
E_USER_NOTICE => 'PHP User Notice',
|
||||
E_USER_WARNING => 'PHP User Warning',
|
||||
E_WARNING => 'PHP Warning',
|
||||
self::E_HHVM_FATAL_ERROR => 'HHVM Fatal Error',
|
||||
];
|
||||
] + (PHP_VERSION_ID < 80400 ? [E_STRICT => 'PHP Strict Warning'] : []);
|
||||
|
||||
return isset($names[$this->getCode()]) ? $names[$this->getCode()] : 'Error';
|
||||
return $names[$this->getCode()] ?? 'Error';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user