Parser::extensionSubstitution() Don't run substr() on null
extensionSubstitution returns a string, not null,
so if $params['attr'] is not set, default to using
an empty string (''), not null.
Bug: T312519
Bug: T312520
Change-Id: I566d95a32cffe1ef20f18ae9d9af96d57e0823a9
This commit is contained in:
parent
c016da960a
commit
5d2feb1da1
1 changed files with 1 additions and 4 deletions
|
|
@ -3993,7 +3993,7 @@ class Parser {
|
|||
return $name;
|
||||
}
|
||||
|
||||
$attrText = !isset( $params['attr'] ) ? null : $frame->expand( $params['attr'] );
|
||||
$attrText = !isset( $params['attr'] ) ? '' : $frame->expand( $params['attr'] );
|
||||
if ( substr( $attrText, 0, $errorLen ) === $errorStr ) {
|
||||
// See above
|
||||
return $attrText;
|
||||
|
|
@ -4034,9 +4034,6 @@ class Parser {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if ( $attrText === null ) {
|
||||
$attrText = '';
|
||||
}
|
||||
if ( isset( $params['attributes'] ) ) {
|
||||
foreach ( $params['attributes'] as $attrName => $attrValue ) {
|
||||
$attrText .= ' ' . htmlspecialchars( $attrName ) . '="' .
|
||||
|
|
|
|||
Loading…
Reference in a new issue