From 4512883f38bd8038bde15205df4afb841957a140 Mon Sep 17 00:00:00 2001 From: Michael Gmelin Date: Tue, 3 Dec 2024 16:47:54 +0100 Subject: devel/phabricator: Fix phpmailer with PHP 8 PR: 280512 Reported by: Ivan Rozhuk --- devel/phabricator/Makefile | 5 +++-- ...atch-externals_phpmailer_class.phpmailer-lite.php | 11 +++++++++++ .../patch-externals_phpmailer_class.phpmailer.php | 11 +++++++++++ .../files/patch-externals_phpmailer_class.smtp.php | 20 ++++++++++++++++++++ 4 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 devel/phabricator/files/patch-externals_phpmailer_class.phpmailer-lite.php create mode 100644 devel/phabricator/files/patch-externals_phpmailer_class.phpmailer.php create mode 100644 devel/phabricator/files/patch-externals_phpmailer_class.smtp.php diff --git a/devel/phabricator/Makefile b/devel/phabricator/Makefile index 6c80d8ef0e85..10288310a0b7 100644 --- a/devel/phabricator/Makefile +++ b/devel/phabricator/Makefile @@ -1,6 +1,6 @@ PORTNAME= phabricator PORTVERSION= 20211218 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= devel PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX} @@ -14,8 +14,9 @@ LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= arcanist-lib${PHP_PKGNAMESUFFIX}>=20210113_4:devel/arcanist-lib@${PHP_FLAVOR} \ git:devel/git -USES= cpe php:cli,flavors shebangfix +USES= cpe dos2unix php:cli,flavors shebangfix CPE_VENDOR= phacility +DOS2UNIX_FILES= externals/phpmailer/class.smtp.php externals/phpqrcode/phpqrcode.php USE_GITHUB= yes GH_ACCOUNT= phacility GH_TAGNAME= dec9522 diff --git a/devel/phabricator/files/patch-externals_phpmailer_class.phpmailer-lite.php b/devel/phabricator/files/patch-externals_phpmailer_class.phpmailer-lite.php new file mode 100644 index 000000000000..ec552a49b104 --- /dev/null +++ b/devel/phabricator/files/patch-externals_phpmailer_class.phpmailer-lite.php @@ -0,0 +1,11 @@ +--- externals/phpmailer/class.phpmailer-lite.php.orig 2024-12-03 14:44:25 UTC ++++ externals/phpmailer/class.phpmailer-lite.php +@@ -1492,7 +1492,7 @@ class PHPMailerLite { + $eol = "\r\n"; + $escape = '='; + $output = ''; +- while( list(, $line) = each($lines) ) { ++ foreach ($lines as $line) { + $linlen = strlen($line); + $newline = ''; + for($i = 0; $i < $linlen; $i++) { diff --git a/devel/phabricator/files/patch-externals_phpmailer_class.phpmailer.php b/devel/phabricator/files/patch-externals_phpmailer_class.phpmailer.php new file mode 100644 index 000000000000..eed5581a6b8f --- /dev/null +++ b/devel/phabricator/files/patch-externals_phpmailer_class.phpmailer.php @@ -0,0 +1,11 @@ +--- externals/phpmailer/class.phpmailer.php.orig 2024-12-03 14:44:25 UTC ++++ externals/phpmailer/class.phpmailer.php +@@ -1624,7 +1624,7 @@ class PHPMailer { + $eol = "\r\n"; + $escape = '='; + $output = ''; +- while( list(, $line) = each($lines) ) { ++ foreach ($lines as $line) { + $linlen = strlen($line); + $newline = ''; + for($i = 0; $i < $linlen; $i++) { diff --git a/devel/phabricator/files/patch-externals_phpmailer_class.smtp.php b/devel/phabricator/files/patch-externals_phpmailer_class.smtp.php new file mode 100644 index 000000000000..69047be742ef --- /dev/null +++ b/devel/phabricator/files/patch-externals_phpmailer_class.smtp.php @@ -0,0 +1,20 @@ +--- externals/phpmailer/class.smtp.php.orig 2024-12-03 14:44:25 UTC ++++ externals/phpmailer/class.smtp.php +@@ -385,7 +385,7 @@ class SMTP { + + $max_line_length = 998; // used below; set here for ease in change + +- while(list(,$line) = @each($lines)) { ++ foreach($lines as $line) { + $lines_out = null; + if($line == "" && $in_headers) { + $in_headers = false; +@@ -414,7 +414,7 @@ class SMTP { + $lines_out[] = $line; + + // send the lines to the server +- while(list(,$line_out) = @each($lines_out)) { ++ foreach($lines_out as $line_out) { + if(strlen($line_out) > 0) + { + if(substr($line_out, 0, 1) == ".") { -- cgit v1.2.3