Last modified: 2014-01-11 20:11:38 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 T61785, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 59785 - Fatal error: Call to a member function getCommonMetaArray() on a non-object at File.php on line 586
Fatal error: Call to a member function getCommonMetaArray() on a non-object a...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
unspecified
All All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-07 19:43 UTC by Sam Reed (reedy)
Modified: 2014-01-11 20:11 UTC (History)
7 users (show)

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


Attachments

Description Sam Reed (reedy) 2014-01-07 19:43:38 UTC
[07-Jan-2014 19:37:04] Fatal error: Call to a member function getCommonMetaArray() on a non-object at /usr/local/apache/common-local/php-1.23wmf9/includes/filerepo/file/File.php on line 586
Server: mw1116
Method: GET
URL: http://commons.wikimedia.org/w/api.php?titles=File%3AAu_clair_de_la_lune_mode_do.mid&iiprop=timestamp%7Cuser%7Ccomment%7Curl%7Csize%7Csha1%7Cmetadata%7Cmime%7Cmediatype%7Cextmetadata&prop=imageinfo&iimetadataversion=2&iiextmetadatamultilang=1&format=json&action=query&redirects=true&uselang=tr
Backtrace:
#0 /usr/local/apache/common-local/php-1.23wmf9/includes/filerepo/file/File.php(586): File::getCommonMetaArray()
#1 /usr/local/apache/common-local/php-1.23wmf9/includes/media/FormatMetadata.php(1689): File->getCommonMetaArray()
#2 /usr/local/apache/common-local/php-1.23wmf9/includes/media/FormatMetadata.php(1623): FormatMetadata->getExtendedMetadataFromFile(Object(LocalFile))
#3 /usr/local/apache/common-local/php-1.23wmf9/includes/api/ApiQueryImageInfo.php(463): FormatMetadata->fetchExtendedMetadata(Object(LocalFile))
#4 /usr/local/apache/common-local/php-1.23wmf9/includes/api/ApiQueryImageInfo.php(158): ApiQueryImageInfo::getInfo(Object(LocalFile), Array, Object(ApiResult), NULL, Array)
#5 /usr/local/apache/common-local/php-1.23wmf9/includes/api/ApiQuery.php(278): ApiQueryImageInfo->execute()
#6 /usr/local/apache/common-local/php-1.23wmf9/includes/api/ApiMain.php(862): ApiQuery->execute()
#7 /usr/local/apache/common-local/php-1.23wmf9/includes/api/ApiMain.php(387): ApiMain->executeAction()
#8 /usr/local/apache/common-local/php-1.23wmf9/includes/api/ApiMain.php(358): ApiMain->executeActionWithErrorHandling()
#9 /usr/local/apache/common-local/php-1.23wmf9/api.php(76): ApiMain->execute()
#10 /usr/local/apache/common-local/w/api.php(3): require('/usr/local/apac...')
#11 {main}
Comment 1 Sam Reed (reedy) 2014-01-07 19:59:44 UTC
Occurs in wmf8 too
Comment 2 Sam Reed (reedy) 2014-01-07 20:01:17 UTC
At a quick glance, this is apparently already guarded against (in master at least)

		if ( $common !== false ) {
			foreach ( $common as $key => $value ) {
				$fileMetadata[$key] = array(
					'value' => $value,
					'source' => 'file-metadata',
				);
			}
Comment 3 Sam Reed (reedy) 2014-01-07 20:02:54 UTC
(In reply to comment #2)
> At a quick glance, this is apparently already guarded against (in master at
> least)
> 
>         if ( $common !== false ) {
>             foreach ( $common as $key => $value ) {
>                 $fileMetadata[$key] = array(
>                     'value' => $value,
>                     'source' => 'file-metadata',
>                 );
>             }

Ignore that

getHandler can return false


	/**
	 * Like getMetadata but returns a handler independent array of common values.
	 * @see MediaHandler::getCommonMetaArray()
	 * @return array|bool Array or false if not supported
	 * @since 1.23
	 */
	public function getCommonMetaArray() {
		$handler = $this->getHandler();

		return $handler->getCommonMetaArray( $this );
	}
Comment 4 Gerrit Notification Bot 2014-01-07 20:04:56 UTC
Change 105998 had a related patch set uploaded by Reedy:
Call to a member function getCommonMetaArray() on a non-object at File.php on line 586

https://gerrit.wikimedia.org/r/105998
Comment 5 Gerrit Notification Bot 2014-01-07 20:31:21 UTC
Change 106007 had a related patch set uploaded by Reedy:
Call to a member function getCommonMetaArray() on a non-object at File.php on line 586

https://gerrit.wikimedia.org/r/106007
Comment 6 Gerrit Notification Bot 2014-01-07 20:31:40 UTC
Change 106009 had a related patch set uploaded by Reedy:
Call to a member function getCommonMetaArray() on a non-object at File.php on line 586

https://gerrit.wikimedia.org/r/106009
Comment 7 Gerrit Notification Bot 2014-01-07 20:36:28 UTC
Change 106009 merged by Reedy:
Call to a member function getCommonMetaArray() on a non-object at File.php on line 586

https://gerrit.wikimedia.org/r/106009
Comment 8 Gerrit Notification Bot 2014-01-07 20:42:16 UTC
Change 106007 merged by jenkins-bot:
Call to a member function getCommonMetaArray() on a non-object at File.php on line 586

https://gerrit.wikimedia.org/r/106007
Comment 9 Gerrit Notification Bot 2014-01-08 10:34:09 UTC
Change 105998 merged by jenkins-bot:
Call to a member function getCommonMetaArray() on a non-object at File.php on line 586

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

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


Navigation
Links