diff --git a/tools/scripts/composer/net-smtp-fix.sh b/tools/scripts/composer/net-smtp-fix.sh index fb573c15b64c..87721739d956 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 000000000000..6ed1605c041c --- /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)) {