File: Fix-PHP-8.4-deprecations.patch

package info (click to toggle)
phing 3.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,548 kB
  • sloc: php: 59,817; xml: 9,767; sql: 78; makefile: 39; sh: 14
file content (23 lines) | stat: -rw-r--r-- 920 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From: William Desportes <williamdes@wdes.fr>
Date: Sun, 13 Apr 2025 16:07:31 +0200
Subject: Fix PHP 8.4 deprecations

Origin: vendor
Forwarded: no
---
 src/Phing/Task/System/VersionTask.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Phing/Task/System/VersionTask.php b/src/Phing/Task/System/VersionTask.php
index 37119f3..94ad1e4 100644
--- a/src/Phing/Task/System/VersionTask.php
+++ b/src/Phing/Task/System/VersionTask.php
@@ -201,7 +201,7 @@ class VersionTask extends Task
      */
     private function getVersion($oldVersion): string
     {
-        preg_match('#^(?<PREFIX>v)?(?<MAJOR>\d+)?(?:\.(?<MINOR>\d+))?(?:\.(?<BUGFIX>\d+))?#', $oldVersion, $version);
+        preg_match('#^(?<PREFIX>v)?(?<MAJOR>\d+)?(?:\.(?<MINOR>\d+))?(?:\.(?<BUGFIX>\d+))?#', $oldVersion ?? '', $version);
 
         // Setting values if not captured
         $version['PREFIX'] = $version['PREFIX'] ?? '';