Page MenuHomePhabricator

Undefined index: 1 in PhpDateTimeParser.php on line 180 (and sometimes line 179)
Closed, ResolvedPublic

Description

Mar 24 23:17:51 mw1123: #012Notice: Undefined index: 1 in /srv/mediawiki/php-1.25wmf22/extensions/Wikidata/extensions/Wikibase/lib/includes/parsers/PhpDateTimeParser.php on line 180
Mar 24 23:17:52 mw1230: #012Notice: Undefined index: 1 in /srv/mediawiki/php-1.25wmf22/extensions/Wikidata/extensions/Wikibase/lib/includes/parsers/PhpDateTimeParser.php on line 179

Event Timeline

aude raised the priority of this task from to Needs Triage.
aude updated the task description. (Show Details)
aude subscribed.

Change 199604 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Fix isset() check in PhpDateTimeParser

https://gerrit.wikimedia.org/r/199604

Turns out, this is an HHVM-only thingy. There are even test cases that should have triggered this, but PHP suppresses this notice and neither my machine nor Jenkins complained because we both don't have a HHVM test run (now tracked in T93871).

I double-checked and my mistake in the code does not cause any harm other than the notices in the logs. This issue is only triggered for invalid dates that can't be parsed by that parser anyway. It fails anyway in a later step.

However, the patch can be backported in my opinion if you care about clean logs.

Change 199604 merged by jenkins-bot:
Fix isset() check in PhpDateTimeParser

https://gerrit.wikimedia.org/r/199604

Change 199612 had a related patch set uploaded (by Aude):
Fix isset() check in PhpDateTimeParser

https://gerrit.wikimedia.org/r/199612

hoo claimed this task.

Change 199612 merged by jenkins-bot:
Fix isset() check in PhpDateTimeParser

https://gerrit.wikimedia.org/r/199612