X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FPathRouter.php;h=eb52d7cd23d9ce415aea7afdaf93b69e1053ba32;hb=1eaf65d0a5f551216668a9e434ce323f0ba7dafe;hp=db12e74c427fd08f6ec2134b9ebc6ff9942d4c12;hpb=e895217711438e8ba84ec8232daf90b9c0d6cf1d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/PathRouter.php b/includes/PathRouter.php index db12e74c42..eb52d7cd23 100644 --- a/includes/PathRouter.php +++ b/includes/PathRouter.php @@ -133,10 +133,8 @@ class PathRouter { // Loop over our options and convert any single value $# restrictions // into an array so we only have to do in_array tests. foreach ( $options as $optionName => $optionData ) { - if ( preg_match( '/^\$\d+$/u', $optionName ) ) { - if ( !is_array( $optionData ) ) { - $options[$optionName] = [ $optionData ]; - } + if ( preg_match( '/^\$\d+$/u', $optionName ) && !is_array( $optionData ) ) { + $options[$optionName] = [ $optionData ]; } }