Page MenuHomePhabricator

Access to undeclared static property: <::$instance at on line 340
Closed, ResolvedPublic

Description

[11-Nov-2013 22:20:25] Fatal error: Access to undeclared static property: ::$instance at on line 340
Server: mw1054
Method: GET
URL: http://commons.wikimedia.org/w/index.php?title=Special%3AListFiles&limit=500&user=&sort=img_size&asc=&desc=1&uselang=de
Backtrace:
#0 (340): ::()
#1 /usr/local/apache/common-local/php-1.23wmf3/includes/filebackend/FSFile.php(114): ::()
#2 /usr/local/apache/common-local/php-1.23wmf3/includes/filebackend/FileBackendStore.php(701): FSFile->getProps()
#3 /usr/local/apache/common-local/php-1.23wmf3/includes/filebackend/FileBackendMultiWrite.php(563): FileBackendStore->getFileProps(Array)
#4 /usr/local/apache/common-local/php-1.23wmf3/includes/filerepo/FileRepo.php(1422): FileBackendMultiWrite->getFileProps(Array)
#5 /usr/local/apache/common-local/php-1.23wmf3/includes/filerepo/file/LocalFile.php(282): FileRepo->getFileProps('mwrepo://local/...')
#6 /usr/local/apache/common-local/php-1.23wmf3/includes/filerepo/file/LocalFile.php(515): LocalFile->loadFromFile()
#7 /usr/local/apache/common-local/php-1.23wmf3/includes/filerepo/file/LocalFile.php(496): LocalFile->upgradeRow()
#8 /usr/local/apache/common-local/php-1.23wmf3/includes/filerepo/file/LocalFile.php(455): LocalFile->maybeUpgradeRow()
#9 /usr/local/apache/common-local/php-1.23wmf3/includes/filerepo/file/LocalFile.php(349): LocalFile->loadFromRow(Object(stdClass))
#10 /usr/local/apache/common-local/php-1.23wmf3/includes/filerepo/file/LocalFile.php(465): LocalFile->loadFromDB()
#11 /usr/local/apache/common-local/php-1.23wmf3/includes/filerepo/file/LocalFile.php(729): LocalFile->load()
#12 /usr/local/apache/common-local/php-1.23wmf3/includes/filerepo/FileRepo.php(366): LocalFile->exists()
#13 tions/(0): FileRepo->findFile()
#14 /usr/local/apache/common-local/php-1.23wmf3/includes/Pager.php(1026): ->Special:Contributions/('thumb', 'Zentralbiblioth...')
#15 /usr/local/apache/common-local/php-1.23wmf3/includes/Pager.php(435): TablePager->formatRow(Object(stdClass))
#16 독일 마르크(16): IndexPager->getBody()
#17 /usr/local/apache/common-local/php-1.23wmf3/includes/SpecialPage.php(631): BGO->DDM(NULL)
#18 /usr/local/apache/common-local/php-1.23wmf3/includes/SpecialPageFactory.php(488): SpecialPage->run(NULL)
#19 /usr/local/apache/common-local/php-1.23wmf3/includes/Wiki.php(298): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#20 /usr/local/apache/common-local/php-1.23wmf3/includes/Wiki.php(596): MediaWiki->performRequest()
#21 /usr/local/apache/common-local/php-1.23wmf3/includes/Wiki.php(460): MediaWiki->main()
#22 /usr/local/apache/common-local/php-1.23wmf3/index.php(49): MediaWiki->run()
#23 /usr/local/apache/common-local/w/index.php(3): require('/usr/local/apac...')

#24 {main}

[11-Nov-2013 22:48:18] Fatal error: Access to undeclared static property: <::$instance at on line 340
Server: mw1030
Method: GET
URL: http://commons.wikimedia.org/w/index.php?title=Special%3AListFiles&limit=250&user=&offset=527888912&sort=img_size&asc=&desc=1&uselang=de
Backtrace:
#0 (340): <::()
#1 /usr/local/apache/common-local/php-1.23wmf3/includes/filebackend/FSFile.php(114): <::()
#2 /usr/local/apache/common-local/php-1.23wmf3/includes/filebackend/FileBackendStore.php(701): FSFile->getProps()
#3 /usr/local/apache/common-local/php-1.23wmf3/includes/filebackend/FileBackendMultiWrite.php(563): FileBackendStore->getFileProps(Array)
#4 /usr/local/apache/common-local/php-1.23wmf3/includes/filerepo/FileRepo.php(1422): FileBackendMultiWrite->getFileProps(Array)
#5 /usr/local/apache/common-local/php-1.23wmf3/includes/filerepo/file/LocalFile.php(282): FileRepo->getFileProps('mwrepo://local/...')
#6 /usr/local/apache/common-local/php-1.23wmf3/includes/filerepo/file/LocalFile.php(515): LocalFile->loadFromFile()
#7 /usr/local/apache/common-local/php-1.23wmf3/includes/filerepo/file/LocalFile.php(496): LocalFile->upgradeRow()
#8 /usr/local/apache/common-local/php-1.23wmf3/includes/filerepo/file/LocalFile.php(455): LocalFile->maybeUpgradeRow()
#9 /usr/local/apache/common-local/php-1.23wmf3/includes/filerepo/file/LocalFile.php(349): LocalFile->loadFromRow(Object(stdClass))
#10 /usr/local/apache/common-local/php-1.23wmf3/includes/filerepo/file/LocalFile.php(465): LocalFile->loadFromDB()
#11 /usr/local/apache/common-local/php-1.23wmf3/includes/filerepo/file/LocalFile.php(729): LocalFile->load()
#12 /usr/local/apache/common-local/php-1.23wmf3/includes/filerepo/FileRepo.php(366): LocalFile->exists()
#13(1973): FileRepo->findFile()
#14 /usr/local/apache/common-local/php-1.23wmf3/includes/Pager.php(1026): ->('thumb', 'Zentralbiblioth...')
#15 /usr/local/apache/common-local/php-1.23wmf3/includes/Pager.php(435): TablePager->formatRow(Object(stdClass))
#16 ▒(0): IndexPager->getBody()
#17 /usr/local/apache/common-local/php-1.23wmf3/includes/SpecialPage.php(631): ->▒▒▒(NULL)
#18 /usr/local/apache/common-local/php-1.23wmf3/includes/SpecialPageFactory.php(488): SpecialPage->run(NULL)
#19 /usr/local/apache/common-local/php-1.23wmf3/includes/Wiki.php(298): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#20 /usr/local/apache/common-local/php-1.23wmf3/includes/Wiki.php(596): MediaWiki->performRequest()
#21 /usr/local/apache/common-local/php-1.23wmf3/includes/Wiki.php(460): MediaWiki->main()
#22 /usr/local/apache/common-local/php-1.23wmf3/index.php(49): MediaWiki->run()
#23 /usr/local/apache/common-local/w/index.php(3): require('/usr/local/apac...')
#24 {main}


Version: 1.23.0
Severity: normal

Details

Reference
bz56915

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:29 AM
bzimport set Reference to bz56915.
bzimport added a subscriber: Unknown Object (MLST).

That is MimeMagic::$instance which is a singleton and instanced in MimeMagic::singleton().
Depending on the line number the null check fails. Need php a static to be initialized before use in condition? New php version?

Change 97164 had a related patch set uploaded by Aaron Schulz:
Clean up MimeMagic singleton handling

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

Change 97164 merged by jenkins-bot:
Clean up MimeMagic singleton handling

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

Clean up of code was merged, so hopefully this should not happen anymore.

Gilles raised the priority of this task from Medium to Unbreak Now!.Dec 4 2014, 10:24 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to Medium.Dec 4 2014, 11:21 AM