Last modified: 2013-08-22 14:55:54 UTC
[15-Nov-2012 17:21:39] Fatal error: Call to a member function getDefaultFormat() on a non-object at /usr/local/apache/common-local/php-1.21wmf3/includes/api/ApiQueryRevisions.php on line 548
Server: mw70 Method: GET URL: http://os.wikipedia.org/w/api.php?action=query&format=php&prop=revisions&titles=1890&rvlimit=1&rvprop=content|timestamp Backtrace: #0 /usr/local/apache/common-local/php-1.21wmf3/includes/api/ApiQueryRevisions.php(548): ApiQueryRevisions::extractRowInfo() #1 /usr/local/apache/common-local/php-1.21wmf3/includes/api/ApiQueryRevisions.php(380): ApiQueryRevisions->extractRowInfo(Object(stdClass)) #2 /usr/local/apache/common-local/php-1.21wmf3/includes/api/ApiQuery.php(327): ApiQueryRevisions->execute() #3 /usr/local/apache/common-local/php-1.21wmf3/includes/api/ApiMain.php(820): ApiQuery->execute() #4 /usr/local/apache/common-local/php-1.21wmf3/includes/api/ApiMain.php(372): ApiMain->executeAction() #5 /usr/local/apache/common-local/php-1.21wmf3/includes/api/ApiMain.php(349): ApiMain->executeActionWithErrorHandling() #6 /usr/local/apache/common-local/php-1.21wmf3/api.php(77): ApiMain->execute() #7 /usr/local/apache/common-local/live-1.5/api.php(3): require('/usr/local/apac...') #8 {main}
The text for revision 107305 on oswiki seems to be missing. Pre-ContentHandler, the API would get a "false" value back from $revision->getText() in this case, which would be silently cast to an empty string. Now we get back null from $revision->getContent(), and then a PHP fatal error when we try to call its methods. Gerrit change #33730 takes us back to the old behavior (and the current behavior for the edit form, e.g. http://os.wikipedia.org/w/index.php?oldid=107305&action=edit) of treating this situation as if the revision were empty.
Change Ic41d03fc: (bug 42168) Nicely handle missing revisions in ApiQueryRevisions.
Alternative solution: Change I5f1eb538: (bug 42168) ApiQueryRevisions shouldn't error on missing content
Change Ic41d03fc merged.
*** Bug 43549 has been marked as a duplicate of this bug. ***
Closed older resolved bugs as verified.