X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=img_auth.php;h=0a209e98b42464064adaf44049958004a5288752;hb=6b5f1a6cdbc84a84ee793c3826306b110e1d40b5;hp=ca69d31d53e80b18d600b2125cf830f9a3282723;hpb=5f4cf303e22c522a63d08cac61b38e74a8dfd0f7;p=lhc%2Fweb%2Fwiklou.git diff --git a/img_auth.php b/img_auth.php index ca69d31d53..0a209e98b4 100644 --- a/img_auth.php +++ b/img_auth.php @@ -148,7 +148,7 @@ function wfImageAuthMain() { } // Run hook for extension authorization plugins - /** @var $result array */ + /** @var array $result */ $result = null; if ( !Hooks::run( 'ImgAuthBeforeStream', [ &$title, &$path, &$name, &$result ] ) ) { wfForbidden( $result[0], $result[1], array_slice( $result, 2 ) ); @@ -186,13 +186,12 @@ function wfImageAuthMain() { * subsequent arguments to $msg2 will be passed as parameters only for replacing in $msg2 * @param string $msg1 * @param string $msg2 + * @param mixed ...$args To pass as params to wfMessage() with $msg2. Either variadic, or a single + * array argument. */ -function wfForbidden( $msg1, $msg2 ) { +function wfForbidden( $msg1, $msg2, ...$args ) { global $wgImgAuthDetails; - $args = func_get_args(); - array_shift( $args ); - array_shift( $args ); $args = ( isset( $args[0] ) && is_array( $args[0] ) ) ? $args[0] : $args; $msgHdr = wfMessage( $msg1 )->escaped();