Index: trunk/phase3/includes/CoreParserFunctions.php |
— | — | @@ -161,7 +161,7 @@ |
162 | 162 | static function pad( $string = '', $length = 0, $char = 0, $direction = STR_PAD_RIGHT ) { |
163 | 163 | $length = min( max( $length, 0 ), 500 ); |
164 | 164 | $char = substr( $char, 0, 1 ); |
165 | | - return ( $string && (int)$length > 0 && strlen( trim( (string)$char ) ) > 0 ) |
| 165 | + return ( $string !== '' && (int)$length > 0 && strlen( trim( (string)$char ) ) > 0 ) |
166 | 166 | ? str_pad( $string, $length, (string)$char, $direction ) |
167 | 167 | : $string; |
168 | 168 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -275,6 +275,7 @@ |
276 | 276 | the intended skin directly in the URL. |
277 | 277 | * (bug 9903) Don't mark redirects in categories as stubs |
278 | 278 | * (bug 6965) Cannot include "Template:R" with {{R}} (magic word conflict) |
| 279 | +* Padding parser functions now work with strings like '0' that evaluate to false |
279 | 280 | |
280 | 281 | == API changes since 1.10 == |
281 | 282 | |