splitbrain / dokuwiki-plugin-swiftmail

Use SwiftMailer for sending mails from DokuWiki
http://www.dokuwiki.org/plugin:swiftmail
4 stars 4 forks source link

Error 500 w/ PHP 7.0 #31

Open jarbro opened 7 years ago

jarbro commented 7 years ago

Would get the following error.

[10-Nov-2016 17:45:21 America/New_York] PHP Parse error: syntax error, unexpected 'new' (T_NEW) in /var/www/dokuwiki/public_html/lib/plugins/swiftmail/action.php on line 44

Upon deleting the plugin error 500 goes away.

threadi commented 7 years ago

The reason is the "&" on this an some other lines in action.php:

$smtp =& new Swift_Connection_SMTP( $this->getConf('smtp_host'), $this->getConf('smtp_port'), $this->getConf('smtp_ssl') );

wwwald commented 7 years ago

So, a temporary fix would be to remove the "&"? Apologies, I'm not very up-to-date with respect to PHP7.

threadi commented 7 years ago

Yes. Take a look: http://php.net/manual/de/migration70.incompatible.php

YesThatAllen commented 7 years ago

Moving to https://github.com/splitbrain/dokuwiki-plugin-smtp seems to be preferred. Any pointers on how to view/migrate the old swiftmail configuration would be appreciated.

RubyRachel commented 1 year ago

[10-Nov-2016 17:45:21 America/New_York] PHP Parse error: syntax error, unexpected 'new' (T_NEW) in /var/www/dokuwiki/public_html/lib/plugins/swiftmail/action.php on line 44 how to solve this proplem