Last modified: 2013-01-08 10:30:05 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 T45330, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 43330 - 2 Fatals on ApiGetEntities.php line 129
2 Fatals on ApiGetEntities.php line 129
Status: RESOLVED DUPLICATE of bug 42795
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Wikidata bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-21 19:14 UTC by Sam Reed (reedy)
Modified: 2013-01-08 10:30 UTC (History)
4 users (show)

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


Attachments

Description Sam Reed (reedy) 2012-12-21 19:14:47 UTC
[19:12:35] <Reedy> Fatal error:  Call to a member function getNumericId() on a non-object in /usr/local/apache/common-local/php-1.21wmf6/extensions/Wikibase/repo/includes/api/ApiGetEntities.php on line 129
[19:12:41] <Reedy> Fatal error:  Call to a member function getPrefixedId() on a non-object in /usr/local/apache/common-local/php-1.21wmf6/extensions/Wikibase/repo/includes/api/ApiGetEntities.php on line 129

Stack traces to come
Comment 1 Sam Reed (reedy) 2012-12-21 19:21:22 UTC
reedy@fenari:~$ tail -n 1000 /home/wikipedia/syslog/apache.log | grep "line 129"
Dec 21 18:50:56 10.0.8.7 apache2[1077]: PHP Fatal error:  Call to a member function getNumericId() on a non-object in /usr/local/apache/common-local/php-1.21wmf6/extensions/Wikibase/repo/includes/api/ApiGetEntities.php on line 129
Dec 21 18:51:09 10.0.8.5 apache2[24675]: PHP Fatal error:  Call to a member function getPrefixedId() on a non-object in /usr/local/apache/common-local/php-1.21wmf6/extensions/Wikibase/repo/includes/api/ApiGetEntities.php on line 129
Dec 21 18:51:45 10.0.8.46 apache2[20001]: PHP Fatal error:  Call to a member function getNumericId() on a non-object in /usr/local/apache/common-local/php-1.21wmf6/extensions/Wikibase/repo/includes/api/ApiGetEntities.php on line 129

Looks like this might actually have already been handled on master. Line 129 has seemingly moved to line 137. And the returned value that becomes $entityId is now checked

 124                 $entityId = EntityId::newFromPrefixedId( $id );
 125 
 126                 if ( !$entityId ) {
 127                         //TODO: report as missing instead?
 128                         wfProfileOut( __METHOD__ );
 129                         $this->dieUsage( "Invalid id: $id", 'no-such-entity-id' );
 130                 }
 131 
 132                 // key should be numeric to get the correct behaviour
 133                 // note that this setting depends upon "setIndexedTagName_internal"
 134                 //FIXME: if we get different kinds of entities at once, $entityId->getNumericId() may not be unique.
 135                 $entityPath = array(
 136                         'entities',
 137                         $this->getUsekeys() ? $entityId->getPrefixedId() : $entityId->getNumericId()
 138                 );
Comment 2 Aude 2012-12-21 21:05:50 UTC
https://gerrit.wikimedia.org/r/#/c/38525/ should fix it.
Comment 3 jeblad 2013-01-08 10:30:05 UTC

*** This bug has been marked as a duplicate of bug 42795 ***

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


Navigation
Links