X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fparser%2FPreprocessor_DOM.php;h=3bcd012f4f598b73785f590c997922312d38f764;hb=734a969d5506a80ceabfa2bc61bda79f76d73d5f;hp=d00c40f6ac3394ae33f4880c1745862e5b160922;hpb=a93cf8f4eee40a448bcd99b8fe1c32dc80775b6b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/Preprocessor_DOM.php b/includes/parser/Preprocessor_DOM.php index d00c40f6ac..3bcd012f4f 100644 --- a/includes/parser/Preprocessor_DOM.php +++ b/includes/parser/Preprocessor_DOM.php @@ -878,7 +878,7 @@ class PPDStack { } public function pop() { - if ( !count( $this->stack ) ) { + if ( $this->stack === [] ) { throw new MWException( __METHOD__ . ': no elements remaining' ); } $temp = array_pop( $this->stack ); @@ -902,7 +902,7 @@ class PPDStack { * @return array */ public function getFlags() { - if ( !count( $this->stack ) ) { + if ( $this->stack === [] ) { return [ 'findEquals' => false, 'findPipe' => false, @@ -1876,10 +1876,7 @@ class PPCustomFrame_DOM extends PPFrame_DOM { * @return string|bool */ public function getArgument( $index ) { - if ( !isset( $this->args[$index] ) ) { - return false; - } - return $this->args[$index]; + return $this->args[$index] ?? false; } public function getArguments() {