X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fparser%2FParser.php;h=1603fc699f2bad8616644e29a4f13e80b19167c5;hb=a573c9bd65d82a034869b6faefa6c33402c91f24;hp=f86e73194acd0f14cceb624acb396bf68dbcb741;hpb=58ff7981dee5c5b8409f112bdc8f2f2c0e14cc2b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index f86e73194a..1603fc699f 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -1438,7 +1438,7 @@ class Parser { '-' => '', ' ' => '', 'x' => 'X', - )); + ) ); $titleObj = SpecialPage::getTitleFor( 'Booksources', $num ); return 'mSubstWords->matchStartAndRemove( $part1 ); # Possibilities for substMatch: "subst", "safesubst" or FALSE @@ -3496,7 +3495,6 @@ class Parser { # Parser functions if ( !$found ) { - $colonPos = strpos( $part1, ':' ); if ( $colonPos !== false ) { $func = substr( $part1, 0, $colonPos ); @@ -4449,7 +4447,9 @@ class Parser { $tocraw = array(); $refers = array(); - foreach ( $matches[3] as $headline ) { + $headlines = $numMatches !== false ? $matches[3] : array(); + + foreach ( $headlines as $headline ) { $isTemplate = false; $titleText = false; $sectionIndex = false; @@ -5075,7 +5075,7 @@ class Parser { * in the Parser class. * * This interface (introduced r61913) appears to be undocumented, but - * 'markerName' is used by some core tag hooks to override which strip + * 'markerType' is used by some core tag hooks to override which strip * array their results are placed in. **Use great caution if attempting * this interface, as it is not documented and injudicious use could smash * private variables.**