Last modified: 2014-04-25 06:14:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T60128, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58128 - Linker::processResponsiveImages: Call to a member function getUrl() on a non-object at /includes/Linker.php on line 918
Linker::processResponsiveImages: Call to a member function getUrl() on a non-...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.23.0
All All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-06 22:06 UTC by Antoine "hashar" Musso (WMF)
Modified: 2014-04-25 06:14 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---
aklapper: Backport_WMF-


Attachments

Description Antoine "hashar" Musso (WMF) 2013-12-06 22:06:57 UTC
Spotted on beta, first occurrence on [06-Dec-2013 19:07:33]

Can be reproduced by browsing http://en.wikipedia.beta.wmflabs.org/wiki/Wikipedia:Featured_pictures

[06-Dec-2013 19:07:33] Fatal error: Call to a member function getUrl() on a non-object at /data/project/apache/common-local/php-master/includes/Linker.php on line 918
Server: i-0000031a
Method: GET
URL: http://en.wikipedia.beta.wmflabs.org/wiki/Wikipedia:Featured_pictures
Backtrace:
#0 /data/project/apache/common-local/php-master/includes/Linker.php(918): Linker::processResponsiveImages()
#1 /data/project/apache/common-local/php-master/includes/Linker.php(677): Linker::processResponsiveImages(Object(ForeignAPIFile), Object(ThumbnailImage), Array)
#2 /data/project/apache/common-local/php-master/includes/parser/Parser.php(5482): Linker::makeImageLink(Object(Parser), Object(Title), Object(ForeignAPIFile), Array, Array, false, false, 4)
#3 /data/project/apache/common-local/php-master/includes/parser/Parser.php(2088): Parser->makeImage(Object(Title), '150px', Object(LinkHolderArray))
#4 /data/project/apache/common-local/php-master/includes/parser/Parser.php(1825): Parser->replaceInternalLinks2('?:''"WP:FP" red...')
#5 /data/project/apache/common-local/php-master/includes/parser/Parser.php(1230): Parser->replaceInternalLinks('[[Category:Wiki...')
#6 /data/project/apache/common-local/php-master/includes/parser/Parser.php(395): Parser->internalParse('{{pp-semi|small...')
#7 [internal function]: Parser->parse('{{pp-semi|small...', Object(Title), Object(ParserOptions), true, true, 38155)
#8 /data/project/apache/common-local/php-master/includes/StubObject.php(99): call_user_func_array(Array, Array)
#9 /data/project/apache/common-local/php-master/includes/StubObject.php(119): StubObject->_call('parse', Array)
#10 /data/project/apache/common-local/php-master/includes/content/WikitextContent.php(306): StubObject->__call('parse', Array)
#11 /data/project/apache/common-local/php-master/includes/content/WikitextContent.php(306): StubObject->parse('{{pp-semi|small...', Object(Title), Object(ParserOptions), true, true, 38155)
#12 /data/project/apache/common-local/php-master/includes/WikiPage.php(3560): WikitextContent->getParserOutput(Object(Title), 38155, Object(ParserOptions))
#13 /data/project/apache/common-local/php-master/includes/PoolCounter.php(222): PoolWorkArticleView->doWork()
#14 /data/project/apache/common-local/php-master/includes/Article.php(708): PoolCounterWork->execute()
#15 /data/project/apache/common-local/php-master/includes/actions/ViewAction.php(44): Article->view()
#16 /data/project/apache/common-local/php-master/includes/Wiki.php(441): ViewAction->show()
#17 /data/project/apache/common-local/php-master/includes/Wiki.php(305): MediaWiki->performAction(Object(Article), Object(Title))
#18 /data/project/apache/common-local/php-master/includes/Wiki.php(596): MediaWiki->performRequest()
#19 /data/project/apache/common-local/php-master/includes/Wiki.php(460): MediaWiki->main()
#20 /data/project/apache/common-local/php-master/index.php(49): MediaWiki->run()
#21 /data/project/apache/common-local/w/index.php(3): require('/data/project/a...')
#22 {main}
Comment 1 Bartosz Dziewoński 2013-12-06 22:11:37 UTC
I think Siebrand replaced some `->url` field accesses with `->getUrl()` calls recently.
Comment 2 Bartosz Dziewoński 2013-12-06 22:12:04 UTC
https://gerrit.wikimedia.org/r/#/c/99377/
Comment 3 Siebrand Mazeland 2013-12-06 22:15:44 UTC
Any theories on why this would be the cause? I don't know what error, if any, trying to access a class property on a non-object would cause. I'd expect a similar one (?).
Comment 4 Tyler Romeo 2013-12-06 23:00:13 UTC
The only thing I can think of is that maybe the thumbnail generation is failing. File::transform can return false on failure. If this is the case, then it makes sense that calling ->getUrl() would cause a fatal error (if you try just doing ->url on a variable that is false, it just gives a Notice).

If the above is true, then there may have been some lurking bug in that code that we had no idea about until this change, because the Linker code does not seem to be doing any error checking. ;)
Comment 5 Gerrit Notification Bot 2013-12-09 13:48:41 UTC
Change 100369 had a related patch set uploaded by Siebrand:
Prevent fatal when Fiel::transform() returns false

https://gerrit.wikimedia.org/r/100369
Comment 6 Siebrand Mazeland 2013-12-09 13:49:24 UTC
Don't know if this made it into 1.23wmfX. If yes, it should probably be backported.
Comment 7 Gerrit Notification Bot 2013-12-09 13:56:45 UTC
Change 100369 merged by jenkins-bot:
Prevent fatal when File::transform() returns false

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links