Last modified: 2013-12-02 18:58:22 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 T59865, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 57865 - Multiple fatal errors ("Cannot access protected property") in ApiQueryFileRepoInfo, LocalRepo, etc.
Multiple fatal errors ("Cannot access protected property") in ApiQueryFileRep...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.23.0
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://deployment.wikimedia.beta.wmfl...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-02 18:43 UTC by Kevin Israel (PleaseStand)
Modified: 2013-12-02 18:58 UTC (History)
10 users (show)

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


Attachments

Description Kevin Israel (PleaseStand) 2013-12-02 18:43:18 UTC
When I try to view the API help page, I get the following error:

Fatal error: Cannot access protected property RepoGroup::$reposInitialised in /home/ki/Projects/mediawiki/core/includes/api/ApiQueryFileRepoInfo.php on line 39

This is the case for both my development installation and the labs cluster.

I checked the Git log for includes/filerepo/ForeignAPIRepo.php and found that the visibility of RepoGroup::$reposInitialised had changed in c3bef4243e93 (i.e. Wednesday night).

It looks like this error could be fixed by unconditionally calling $repoGroup->initialiseRepos() in ApiQueryFileRepoInfo::getInitialisedRepoGroup(). However, there are at least two more errors: "$repoGroup->localRepo->getInfo()" in that file, and as already mentioned on Gerrit, "PHP Fatal error: Cannot access protected property LocalRepo::$oldFileFromRowFactory in /www/translatewiki.net/w/includes/filerepo/file/LocalFile.php on line 997".

So this change should be reverted until all existing code that directly accesses the properties is changed to use getter methods.
Comment 1 Kevin Israel (PleaseStand) 2013-12-02 18:46:01 UTC
(In reply to comment #0)
> [...] as
> already mentioned on Gerrit, "PHP Fatal error: Cannot access protected
> property
> LocalRepo::$oldFileFromRowFactory in
> /www/translatewiki.net/w/includes/filerepo/file/LocalFile.php on line 997".

That one was fixed in <https://gerrit.wikimedia.org/r/#/c/98080/>.
Comment 2 Gerrit Notification Bot 2013-12-02 18:52:13 UTC
Change 98570 had a related patch set uploaded by Aaron Schulz:
Fixed api.php fatals due to protected field usage

https://gerrit.wikimedia.org/r/98570
Comment 3 Gerrit Notification Bot 2013-12-02 18:58:22 UTC
Change 98570 merged by jenkins-bot:
Fixed api.php fatals due to protected field usage

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

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


Navigation
Links