Skip to content

Commit d4814b5

Browse files
authored
Merge pull request #125 from ziegenberg/e-strict-deprecation
PHP 8.4: E_STRICT constant deprecated
2 parents 210788e + ba1220f commit d4814b5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Server.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,9 +1416,13 @@ public static function _xmlrpcs_errorHandler($errCode, $errString, $filename = n
14161416
return;
14171417
}
14181418

1419-
//if ($errCode != E_NOTICE && $errCode != E_WARNING && $errCode != E_USER_NOTICE && $errCode != E_USER_WARNING)
1420-
if ($errCode != E_STRICT) {
1419+
// From PHP 8.4 the E_STRICT constant has been deprecated and will emit deprecation notices.
1420+
// PHP core and core extensions since PHP 8.0 and later do not emit E_STRICT notices at all.
1421+
// On PHP 7 series before PHP 7.4, some functions conditionally emit E_STRICT notices.
1422+
if (PHP_VERSION_ID >= 70400) {
14211423
static::error_occurred($errString);
1424+
} elseif ($errCode != E_STRICT) {
1425+
static::error_occurred($errString);
14221426
}
14231427

14241428
// Try to avoid as much as possible disruption to the previous error handling mechanism in place

0 commit comments

Comments
 (0)