Skip to content

Commit 94ee1fc

Browse files
sreichelkiatng
andauthored
PHP84: ignore deprecated E_STRICT (OpenMage#4289)
* fix for php84 deprecated E_STRICT * baseline * Update app/code/core/Mage/Core/functions.php Co-authored-by: Ng Kiat Siong <[email protected]> * baseline --------- Co-authored-by: Ng Kiat Siong <[email protected]>
1 parent 5207750 commit 94ee1fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/core/Mage/Core/functions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function mageCoreErrorHandler($errno, $errstr, $errfile, $errline)
120120
// PEAR specific message handling
121121
if (stripos($errfile . $errstr, 'pear') !== false) {
122122
// ignore strict and deprecated notices
123-
if (($errno == E_STRICT) || ($errno == E_DEPRECATED)) {
123+
if ((PHP_VERSION_ID < 80400 && $errno == E_STRICT) || ($errno == E_DEPRECATED)) {
124124
return true;
125125
}
126126
// ignore attempts to read system files when open_basedir is set
@@ -165,7 +165,7 @@ function mageCoreErrorHandler($errno, $errstr, $errfile, $errline)
165165
case E_USER_NOTICE:
166166
$errorMessage .= 'User Notice';
167167
break;
168-
case E_STRICT:
168+
case 2048: // E_STRICT prior to PHP8.4
169169
$errorMessage .= 'Strict Notice';
170170
break;
171171
case E_RECOVERABLE_ERROR:

0 commit comments

Comments
 (0)