Skip to content

Commit

Permalink
Merge pull request #125 from ziegenberg/e-strict-deprecation
Browse files Browse the repository at this point in the history
PHP 8.4: E_STRICT constant deprecated
  • Loading branch information
gggeek authored Jan 17, 2025
2 parents 210788e + ba1220f commit d4814b5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -1416,9 +1416,13 @@ public static function _xmlrpcs_errorHandler($errCode, $errString, $filename = n
return;
}

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

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

0 comments on commit d4814b5

Please sign in to comment.