X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fparser%2FPreprocessor_Hash.php;h=0326499a7a4c54dcdf13d8a6478ff7452b281fa2;hb=96d25f6bcc0d6f8c67ff96fe72a2a64a8b8412cc;hp=c7f630d5dbe05970cf88c39ae1eb8054347c8ebe;hpb=77e3624caba072521fbc1826af2d47f9b29f4032;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/Preprocessor_Hash.php b/includes/parser/Preprocessor_Hash.php index c7f630d5db..0326499a7a 100644 --- a/includes/parser/Preprocessor_Hash.php +++ b/includes/parser/Preprocessor_Hash.php @@ -504,6 +504,8 @@ class Preprocessor_Hash extends Preprocessor { } elseif ( $found == 'line-end' ) { $piece = $stack->top; // A heading must be open, otherwise \n wouldn't have been in the search list + // FIXME: Don't use assert() + // phpcs:ignore MediaWiki.Usage.ForbiddenFunctions.assert assert( $piece->open === "\n" ); $part = $piece->getCurrentPart(); // Search back through the input to see if it has a proper close. @@ -1366,7 +1368,7 @@ class PPFrame_Hash implements PPFrame { if ( $level === false ) { return $this->title->getPrefixedDBkey(); } else { - return isset( $this->titleCache[$level] ) ? $this->titleCache[$level] : false; + return $this->titleCache[$level] ?? false; } }