Page MenuHomePhabricator

Handle misconfigured notifications in old notification system in a deliberate way
Open, LowestPublic

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

Kghbln created this task.Jun 23 2016, 8:21 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 23 2016, 8:21 PM
Kghbln added a comment.Aug 2 2016, 7:55 AM

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

Kghbln awarded a token.Aug 2 2016, 7:55 AM

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.
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptAug 2 2016, 10:23 PM

Main initial email-formatter commit for new system is rECHO6f6e10084c1d: HTML email formatter using presentation model, which is not in REL1_27.

Kghbln added a comment.Aug 3 2016, 6:31 AM

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.