Skip to content
Snippets Groups Projects

Issue #3303770: PHP 8.1: preg_replace(): Passing null to parameter #2 ($replacement) of type array|string is deprecated in UpdateManager.php line 129

Merged Issue #3303770: PHP 8.1: preg_replace(): Passing null to parameter #2 ($replacement) of type array|string is deprecated in UpdateManager.php line 129
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
+ 1
1
@@ -127,7 +127,7 @@ class UpdateManager {
@@ -127,7 +127,7 @@ class UpdateManager {
*/
*/
public static function toSemanticVersion($version) {
public static function toSemanticVersion($version) {
// Strip the 8.x prefix from the version.
// Strip the 8.x prefix from the version.
$semantic_version = preg_replace('/^' . \Drupal::CORE_COMPATIBILITY . '-/', NULL, $version);
$semantic_version = preg_replace('/^' . \Drupal::CORE_COMPATIBILITY . '-/', '', $version);
if (preg_match('/-dev$/', $semantic_version)) {
if (preg_match('/-dev$/', $semantic_version)) {
return preg_replace('/^(\d).+-dev$/', '$1.x-dev', $semantic_version);
return preg_replace('/^(\d).+-dev$/', '$1.x-dev', $semantic_version);
Loading