Index: trunk/extensions/ParserFunctions/ParserFunctions.php |
— | — | @@ -620,7 +620,7 @@ |
621 | 621 | * Finds first occurrence of "needle" in "string" starting at "offset". |
622 | 622 | * |
623 | 623 | * Note: If the needle is an empty string, single space is used instead. |
624 | | - * Note: If the needle is not found, -1 is returned. |
| 624 | + * Note: If the needle is not found, empty string is returned. |
625 | 625 | */ |
626 | 626 | function runPos ( &$parser, $inStr = '', $inNeedle = '', $inOffset = 0 ) { |
627 | 627 | wfProfileIn( __METHOD__ ); |
— | — | @@ -637,7 +637,7 @@ |
638 | 638 | if( $inNeedle == '' ) { $inNeedle = ' '; } |
639 | 639 | |
640 | 640 | $pos = mb_strpos( $inStr, $inNeedle, $inOffset ); |
641 | | - if( $pos === false ) { $pos = -1; } |
| 641 | + if( $pos === false ) { $pos = ""; } |
642 | 642 | |
643 | 643 | wfProfileOut( __METHOD__ ); |
644 | 644 | return $pos; |