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 created this task.Mar 25 2015, 1:17 AM
aude raised the priority of this task from to Needs Triage.
aude updated the task description. (Show Details)
aude added a subscriber: aude.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 25 2015, 1:17 AM

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

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

thiemowmde added a comment.EditedMar 25 2015, 11:40 AM

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 closed this task as Resolved.Mar 25 2015, 12:51 PM
hoo claimed this task.

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

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

Ricordisamoa edited subscribers, added: Ricordisamoa; removed: gerritbot.