Mail plugin incompatible with PHP 7.1
When using the Mail plugin on a stock Arch Linux system you get array errors from PHP. The issue appears to be a deprecated method in PHP is no longer working. Arch ships PHP 7.1 as default.
The error in the browser when adding mail to a user is:
@Fatal error: Uncaught Error: Cannot use string offset as an array in /usr/share/webapps/fusiondirectory/plugins/personal/mail/class_sieve.inc:325 Stack trace: #0 /usr/share/webapps/fusiondirectory/plugins/personal/mail/mail-methods/class_mail-methods-cyrus.inc(495): sieve->sieve_login() #1 /usr/share/webapps/fusiondirectory/plugins/personal/mail/class_mailAccount.inc(339): mailMethodCyrus->saveSieveSettings() #2 /usr/share/webapps/fusiondirectory/include/simpleplugin/class_simplePlugin.inc(1205): mailAccount->ldap_save() #3 /usr/share/webapps/fusiondirectory/include/simpleplugin/class_simpleTabs.inc(409): simplePlugin->save() #4 /usr/share/webapps/fusiondirectory/include/simpleplugin/class_simpleManagement.inc(779): simpleTabs->save() #5 /usr/share/webapps/fusiondirectory/include/simpleplugin/class_simpleManagement.inc(923): simpleManagement->saveChanges('save', Array, Array) #6 /usr/share/webapps/fusiondirectory/include/simpleplugin/class_simpleManagement.inc(550): simpleManagement->handleActions(Array) #7 /usr/share/web in /usr/share/webapps/fusiondirectory/plugins/personal/mail/class_sieve.inc on line 325@
The php-fpm module logs the following in journald:
@pool www[539]: FusionDirectory [fd-admin]: (view) error: PHP error: Illegal string offset 'implementation' (/usr/share/webapps/fusiondirectory/plugins/personal/mail/class_sieve.inc, line 312) Jul 16 13:50:05 adamwest.example.com php-fpm[539]: pool www[539]: FusionDirectory [fd-admin]: (view) error: PHP error: Illegal string offset 'auth' (/usr/share/webapps/fusiondirectory/plugins/personal/mail/class_sieve.inc, line 325)
Jul 16 13:50:05 adamwest.example.com nginx[427]: 2017/07/16 13:50:05 [error] 508#508: *64 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Cannot use string offset as an array in /usr/share/we
bapps/fusiondirectory/plugins/personal/mail/class_sieve.inc:325 @
Here is some PHP documentation regarding this issue:
(from redmine: issue id 5672, created on 2017-07-16)
- Changesets:
- Revision 6e35f945 by Côme Chilliet on 2017-07-17T14:47:22.000Z:
Fixes #5672 Fixed error and typos in class_sieve.inc
- Revision 05036b36 by Côme Chilliet on 2017-07-24T08:22:40.000Z:
Fixes #5672 Fixed error and typos in class_sieve.inc
- Revision a898bbe7 by Côme Chilliet on 2017-07-24T13:12:46.000Z:
Fixes #5672 Fixed error and typos in class_sieve.inc
- Custom Fields:
- Bug in version: 1.1.1
- Support contract: None