$result = '' in Title->checkPermissionHooks
Fixup $session in ApiWatchTest
This commit is contained in:
parent
c5ba4b459f
commit
898d3438c4
3 changed files with 4 additions and 3 deletions
|
|
@ -1316,6 +1316,7 @@ class Title {
|
|||
*/
|
||||
private function checkPermissionHooks( $action, $user, $errors, $doExpensiveQueries, $short ) {
|
||||
// Use getUserPermissionsErrors instead
|
||||
$result = '';
|
||||
if ( !wfRunHooks( 'userCan', array( &$this, &$user, $action, &$result ) ) ) {
|
||||
return $result ? array() : array( array( 'badaccess-group0' ) );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
class GIFHandler extends BitmapHandler {
|
||||
|
||||
function getMetadata( $image, $filename ) {
|
||||
if ( !isset($image->parsedGIFMetadata) ) {
|
||||
if ( !isset( $image->parsedGIFMetadata ) ) {
|
||||
try {
|
||||
$image->parsedGIFMetadata = GIFMetadataExtractor::getMetadata( $filename );
|
||||
} catch( Exception $e ) {
|
||||
|
|
@ -24,7 +24,7 @@ class GIFHandler extends BitmapHandler {
|
|||
}
|
||||
}
|
||||
|
||||
return serialize($image->parsedGIFMetadata);
|
||||
return serialize( $image->parsedGIFMetadata );
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class ApiWatchTest extends ApiTestSetup {
|
|||
function doApiRequest( $params, $data = null ) {
|
||||
$_SESSION = isset( $data[2] ) ? $data[2] : array();
|
||||
|
||||
$req = new FauxRequest( $params, true, $session );
|
||||
$req = new FauxRequest( $params, true, $_SESSION );
|
||||
$module = new ApiMain( $req, true );
|
||||
$module->execute();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue