Page MenuHomePhabricator

Handle misconfigured notifications in old notification system in a deliberate way
Closed, DeclinedPublic

Description

Setup and configuration

MediaWiki 1.27.0-rc.1 (5462877)
PHP 5.6.22-0+deb8u1 (apache2handler)
Echo – (13aaa9c)
Semantic Notifications - master

Issue

PHP Warning:  Illegal string offset 'subject' in /.../w/extensions/Echo/includes/Notifier.php on line 102
PHP Notice:  Uninitialized string offset: 0 in /.../w/extensions/Echo/includes/Notifier.php on line 102
PHP Warning:  Illegal string offset 'body' in /.../w/extensions/Echo/includes/Notifier.php on line 103
PHP Notice:  Uninitialized string offset: 0 in /.../w/extensions/Echo/includes/Notifier.php on line 103
PHP Warning:  Illegal string offset 'subject' in /.../w/extensions/Echo/includes/Notifier.php on line 102
PHP Notice:  Uninitialized string offset: 0 in /.../w/extensions/Echo/includes/Notifier.php on line 102
PHP Warning:  Illegal string offset 'body' in /.../w/extensions/Echo/includes/Notifier.php on line 103
PHP Notice:  Uninitialized string offset: 0 in /.../w/extensions/Echo/includes/Notifier.php on line 103

This pops up via the job queue when the Semantic Notifications extension tries to send out e-mail notifications.

First assessment

Echo should not fail because of a missing message text key. I'd say, if you have time then let them know that doing

$subject = $email['subject'];
$body = $email['body'];

Event Timeline

It will be cool to have a fix for this since it is kinda flooding the error logs. Indeed greatly appreciated.

If you're saying this only happens with Semantic Notifications (due to their notifications being mis-configured), that seems like a bug in Semantic Notifications, which is not a Collaboration team project and not WMF-deployed.

Maybe Echo should handle this differently (throw an exception, log an error but default without a notice), but it does not seem like a high-priority bug on the Echo side particularly since this is the old notification system.

Mattflaschen-WMF renamed this task from "PHP Warning: Illegal string offset" and "PHP Notice: Uninitialized string offset" to Handle misconfigured notifications in old notification system in a deliberate way.Aug 2 2016, 10:23 PM
Mattflaschen-WMF triaged this task as Lowest priority.

Let's hope for REL1_28 then. It's a bit sad since no e-mails are sent because of the warnings and notices emitted however at least the on wiki notifications work.

@Reedy Sorry about responding late. I cannot tell since Semantic Notifications does no longer attempt to send out emails. This feature was removed to overcomes a set of issues if I am not mistaken. I will close this for now since it can still be re-opened or better referenced by a new issue report if need be.