From: Seamus Lee Date: Sat, 20 May 2017 02:42:47 +0000 (+1000) Subject: Add patch to Net_SMTP for php7 compatability X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a86c2ae10638417796417448e91df14adbd3d2aa;p=civicrm-core.git Add patch to Net_SMTP for php7 compatability --- 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)) {