From 5b0dd2c07b4b4e54a243e103472e7e3873842277 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sat, 20 May 2017 12:42:47 +1000 Subject: [PATCH] Add patch to Net_SMTP for php7 compatability --- tools/scripts/composer/net-smtp-fix.sh | 3 +++ .../scripts/composer/patches/net-smtp-php7-patch.txt | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 tools/scripts/composer/patches/net-smtp-php7-patch.txt diff --git a/tools/scripts/composer/net-smtp-fix.sh b/tools/scripts/composer/net-smtp-fix.sh index fb573c15b6..87721739d9 100755 --- a/tools/scripts/composer/net-smtp-fix.sh +++ b/tools/scripts/composer/net-smtp-fix.sh @@ -18,3 +18,6 @@ fi if ! grep -q '@STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT' vendor/pear/net_smtp/Net/SMTP.php; then patch vendor/pear/net_smtp/Net/SMTP.php < tools/scripts/composer/patches/net-smtp-tls-patch.txt fi +if ! grep -q 'function __construct' vendor/pear/net_smtp/Net/SMTP.php; then +patch vendor/pear/net_smtp/Net/SMTP.php < tools/scripts/composer/patches/net-smtp-php7-patch.txt +fi diff --git a/tools/scripts/composer/patches/net-smtp-php7-patch.txt b/tools/scripts/composer/patches/net-smtp-php7-patch.txt new file mode 100644 index 0000000000..6ed1605c04 --- /dev/null +++ b/tools/scripts/composer/patches/net-smtp-php7-patch.txt @@ -0,0 +1,11 @@ +--- SMTP.php 2017-05-20 11:50:53.716664059 +1000 ++++ SMTP.php.new 2017-05-20 12:38:36.271530119 +1000 +@@ -167,7 +167,7 @@ + * @access public + * @since 1.0 + */ +- function Net_SMTP($host = null, $port = null, $localhost = null, ++ function __construct($host = null, $port = null, $localhost = null, + $pipelining = false, $timeout = 0, $socket_options = null) + { + if (isset($host)) { -- 2.25.1