Skip to content

Commit

Permalink
Add patch to Net_SMTP for php7 compatability
Browse files Browse the repository at this point in the history
  • Loading branch information
seamuslee001 committed May 23, 2017
1 parent 0ccbaca commit 5b0dd2c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/scripts/composer/net-smtp-fix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 11 additions & 0 deletions tools/scripts/composer/patches/net-smtp-php7-patch.txt
Original file line number Diff line number Diff line change
@@ -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)) {

0 comments on commit 5b0dd2c

Please sign in to comment.