diff options
author | Vladimir Druzenko <vvd@FreeBSD.org> | 2023-09-18 12:35:49 +0000 |
---|---|---|
committer | Vladimir Druzenko <vvd@FreeBSD.org> | 2023-09-18 12:39:54 +0000 |
commit | 3f1b38acfda124fc8f03fe5f4edfef10ef214501 (patch) | |
tree | d8c9bc910ea55f3d959141903a474e0221eff776 | |
parent | 49080d96008c1194738fd96b9fa66153d0b21a0a (diff) | |
download | ports-3f1b38acfda124fc8f03fe5f4edfef10ef214501.tar.gz ports-3f1b38acfda124fc8f03fe5f4edfef10ef214501.zip |
www/phpvirtualbox{,-legacy}: PHP 8 support (1 more catch) - "preg_replace"
Fixed:
PHP Warning: preg_replace() expects at least 3 parameters, 2 given in endpoints/screen.php on line 91
PR: 261498
Approved by: tcberner (mentor)
MFH: 2023Q3
-rw-r--r-- | www/phpvirtualbox-legacy/Makefile | 2 | ||||
-rw-r--r-- | www/phpvirtualbox/Makefile | 2 | ||||
-rw-r--r-- | www/phpvirtualbox/files/patch-php8 | 28 |
3 files changed, 27 insertions, 5 deletions
diff --git a/www/phpvirtualbox-legacy/Makefile b/www/phpvirtualbox-legacy/Makefile index 38709462e376..ba80ba721ec8 100644 --- a/www/phpvirtualbox-legacy/Makefile +++ b/www/phpvirtualbox-legacy/Makefile @@ -1,6 +1,6 @@ PORTNAME= phpvirtualbox DISTVERSION= 5.2-1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= www PKGNAMESUFFIX= -legacy diff --git a/www/phpvirtualbox/Makefile b/www/phpvirtualbox/Makefile index 4c4929542c6f..cc67954d33a0 100644 --- a/www/phpvirtualbox/Makefile +++ b/www/phpvirtualbox/Makefile @@ -1,6 +1,6 @@ PORTNAME= phpvirtualbox DISTVERSION= 6.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www MAINTAINER= vbox@FreeBSD.org diff --git a/www/phpvirtualbox/files/patch-php8 b/www/phpvirtualbox/files/patch-php8 index d6566684b8ca..477a1596ba4c 100644 --- a/www/phpvirtualbox/files/patch-php8 +++ b/www/phpvirtualbox/files/patch-php8 @@ -144,12 +144,34 @@ diff -ur endpoints/screen.php.orig endpoints/screen.php // Let the browser cache images for 3 seconds $ctime = 0; - if(strpos($_SERVER['HTTP_IF_NONE_MATCH'],'_')) { -+ if(strpos($_SERVER['HTTP_IF_NONE_MATCH'] ?? '','_')) { - $ctime = preg_replace("/.*_/",str_replace('"','',$_SERVER['HTTP_IF_NONE_MATCH'])); +- $ctime = preg_replace("/.*_/",str_replace('"','',$_SERVER['HTTP_IF_NONE_MATCH'])); - } else if(strpos($_ENV['HTTP_IF_NONE_MATCH'],'_')) { +- $ctime = preg_replace("/.*_/",str_replace('"','',$_ENV['HTTP_IF_NONE_MATCH'])); +- } else if(strpos($_SERVER['HTTP_IF_MODIFIED_SINCE'],'GMT')) { ++ if(strpos($_SERVER['HTTP_IF_NONE_MATCH'] ?? '','_')) { ++ $ctime = preg_replace("/.*_/","",str_replace('"','',$_SERVER['HTTP_IF_NONE_MATCH'])); + } else if(strpos($_ENV['HTTP_IF_NONE_MATCH'] ?? '','_')) { - $ctime = preg_replace("/.*_/",str_replace('"','',$_ENV['HTTP_IF_NONE_MATCH'])); ++ $ctime = preg_replace("/.*_/","",str_replace('"','',$_ENV['HTTP_IF_NONE_MATCH'])); ++ } else if(strpos($_SERVER['HTTP_IF_MODIFIED_SINCE'] ?? '','GMT')) { + $ctime = strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']); +- } else if(strpos($_ENV['HTTP_IF_MODIFIED_SINCE'],'GMT')) { ++ } else if(strpos($_ENV['HTTP_IF_MODIFIED_SINCE'] ?? '','GMT')) { + $ctime = strtotime($_ENV['HTTP_IF_MODIFIED_SINCE']); + } + +@@ -164,13 +164,13 @@ + + // Let the browser cache saved state images + $ctime = 0; +- if(strpos($_SERVER['HTTP_IF_NONE_MATCH'],'_')) { +- $ctime = preg_replace("/.*_/",str_replace('"','',$_SERVER['HTTP_IF_NONE_MATCH'])); +- } else if(strpos($_ENV['HTTP_IF_NONE_MATCH'],'_')) { +- $ctime = preg_replace("/.*_/",str_replace('"','',$_ENV['HTTP_IF_NONE_MATCH'])); - } else if(strpos($_SERVER['HTTP_IF_MODIFIED_SINCE'],'GMT')) { ++ if(strpos($_SERVER['HTTP_IF_NONE_MATCH'] ?? '','_')) { ++ $ctime = preg_replace("/.*_/","",str_replace('"','',$_SERVER['HTTP_IF_NONE_MATCH'])); ++ } else if(strpos($_ENV['HTTP_IF_NONE_MATCH'] ?? '','_')) { ++ $ctime = preg_replace("/.*_/","",str_replace('"','',$_ENV['HTTP_IF_NONE_MATCH'])); + } else if(strpos($_SERVER['HTTP_IF_MODIFIED_SINCE'] ?? '','GMT')) { $ctime = strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']); - } else if(strpos($_ENV['HTTP_IF_MODIFIED_SINCE'],'GMT')) { |