mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
synced 2024-11-15 03:43:55 +00:00
Avoid use of func_get_args()
Change-Id: I7854d2005aefd581959c2cd292928900c047203c
This commit is contained in:
parent
51ddca1bde
commit
71ee586108
|
@ -84,13 +84,10 @@ class CategoryTreeHooks {
|
|||
* Entry point for the {{#categorytree}} tag parser function.
|
||||
* This is a wrapper around CategoryTreeHooks::parserHook
|
||||
* @param Parser $parser
|
||||
* @param string ...$params
|
||||
* @return array|string
|
||||
*/
|
||||
public static function parserFunction( Parser $parser ) {
|
||||
$params = func_get_args();
|
||||
// first is $parser, strip it
|
||||
array_shift( $params );
|
||||
|
||||
public static function parserFunction( Parser $parser, ...$params ) {
|
||||
// first user-supplied parameter must be category name
|
||||
if ( !$params ) {
|
||||
// no category specified, return nothing
|
||||
|
|
Loading…
Reference in a new issue