From fddfc3fe6a874f5e011e818fb1c982e28f3d209f Mon Sep 17 00:00:00 2001 From: Siad Ardroumli Date: Sat, 13 Feb 2021 22:21:04 +0100 Subject: [PATCH 1/3] [PropertyHelper] Fixed deprecation warning PHP 8.1 --- src/Phing/PropertyHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Phing/PropertyHelper.php b/src/Phing/PropertyHelper.php index bc75470b04..44ead186dd 100644 --- a/src/Phing/PropertyHelper.php +++ b/src/Phing/PropertyHelper.php @@ -427,7 +427,7 @@ public function getProperty($ns, $name) return $o; } - $found = $this->properties[$name] ?? null; + $found = $this->properties[$name] ?? ''; // check to see if there are unresolved property references if (false !== strpos($found, '${')) { // attempt to resolve properties From 75bb75946f0559a3779abe59385159594224a8ba Mon Sep 17 00:00:00 2001 From: Siad Ardroumli Date: Sat, 13 Feb 2021 22:29:10 +0100 Subject: [PATCH 2/3] Update PropertyHelper.php --- src/Phing/PropertyHelper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Phing/PropertyHelper.php b/src/Phing/PropertyHelper.php index 44ead186dd..ae45241d44 100644 --- a/src/Phing/PropertyHelper.php +++ b/src/Phing/PropertyHelper.php @@ -427,9 +427,9 @@ public function getProperty($ns, $name) return $o; } - $found = $this->properties[$name] ?? ''; + $found = $this->properties[$name] ?? null; // check to see if there are unresolved property references - if (false !== strpos($found, '${')) { + if ($found !== null && false !== strpos($found, '${')) { // attempt to resolve properties $found = $this->replaceProperties($found, null); if (StringHelper::startsWith('${', $found) && StringHelper::endsWith('}', $found)) { From de6eedb1bcda39ef7fc736d3c8625d1a3e83823c Mon Sep 17 00:00:00 2001 From: Siad Ardroumli Date: Sat, 13 Feb 2021 22:48:30 +0100 Subject: [PATCH 3/3] Fixed warning `preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated` --- src/Phing/Util/PregEngine.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Phing/Util/PregEngine.php b/src/Phing/Util/PregEngine.php index e8e4664f19..4116034880 100644 --- a/src/Phing/Util/PregEngine.php +++ b/src/Phing/Util/PregEngine.php @@ -47,7 +47,7 @@ class PregEngine implements RegexpEngine * @link http://php.net/manual/en/reference.pcre.pattern.modifiers.php * @var string */ - private $modifiers = null; + private $modifiers = ''; /** * Set the limit.