Page MenuHomePhabricator

500 Internal Server Error when using Article Info interface in new XTools
Closed, ResolvedPublic1 Estimated Story Points

Description

I've gotten this error a few times at http://xtools.wmflabs.org/articleinfo/en.wikipedia.org/Thomas%20Jefferson. It seems to happen rather randomly.

500: Internal Server Error
Error: Call to a member function format() on boolean

That's all the info it gives me. Might be able to get more info from the error logs.

Event Timeline

kaldari triaged this task as High priority.Jul 11 2017, 7:18 AM
kaldari set the point value for this task to 1.

The log says:

[2017-07-11 07:26:20] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalErrorException: "Error: Call to a member function format() on boolean" at /var/www/src/Xtools/Edit.php line 103 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 0): Error: Call to a member function format() on boolean at /var/www/src/Xtools/Edit.php:103)"} []

Taking a quick look at the code...

We use DateTime::CreateFromFormat. Docs for that function are here.

The simple answer is that this function is returning "False" which indicates a failure. Then, when we try to use the format() function, it's interpreted as "FALSE->format('%a')" which gives us the error.

Relevant code: Phabricator

Edit: Sorry, fixed links. That's what you get when you have too many tabs open...

Yep, I've been working on this. I think it's memory-related.

I got the same error on prod trying to load a page with a low revision count, so this apparently is different than T170297. I will work on T170297 first.

MusikAnimal moved this task from Ready to Q1 2018-19 on the Community-Tech-Sprint board.

I never actually figured out how to repro this issue but I think T170297 fixed it. We haven't had any 500 errors since then.