Page MenuHomePhabricator

[MirrorTools] Some api functions are not public
Closed, ResolvedPublic

Description

Author: samuel.lampa

Description:
Changes from "protected" to "public" for a few API functions.

I get a message like this, but the same for for a number of functions (listed below):

Fatal error: Access level to ApiMirrorEditPage::getDescription() must be public (as in class ApiEditPage) in /home/samuel/www/smw-trunk/extensions/MirrorTools/APIMirrorTools.php on line 33
Call Stack
# Time Memory Function Location
1 0.0014 398300 {main}( ) ../api.php:0
2 0.1687 9933908 ApiMain->execute( ) ../api.php:117
3 0.1687 9933952 ApiMain->executeActionWithErrorHandling( ) ../ApiMain.php:342
4 0.1743 10239180 ApiMain->substituteResultWithError( ) ../ApiMain.php:369
5 0.1744 10239544 ApiMain->makeHelpMsg( ) ../ApiMain.php:510
6 0.1827 10880468 ApiMain->reallyMakeHelpMsg( ) ../ApiMain.php:893
7 0.1875 11048656 AutoLoader::autoload( ) ../ApiMain.php:0
8 0.1893 11166256 require( '/home/samuel/www/smw-trunk/extensions/MirrorTools/APIMirrorTools.php' )

By changing from "protected" to "public" for the getDescription() function in APIMirrorTools.php, I see that the same error is there also for functions:

getPossibleErrors()
getAllowedParams()
getParamDescription()
getExamples()

The attached patch seems to fix this.


Version: unspecified
Severity: major

Attached:

Details

Reference
bz31356