media: Swap second if for elseif in FormatMetdata::sanitizeKeyForAPI()
Also swap == for === Noted in T268133 as a minor optimisation Change-Id: I7c2198b68cd91dc7a642d0c1f6ce3bf39aeccc41
This commit is contained in:
parent
730e2e5cd1
commit
7acc57cff9
1 changed files with 2 additions and 4 deletions
|
|
@ -2007,12 +2007,10 @@ class FormatMetadata extends ContextSource {
|
|||
// drop characters which are invalid at the first position
|
||||
$key = preg_replace( '/^[\d\-.]+/', '', $key );
|
||||
|
||||
if ( $key == '' ) {
|
||||
if ( $key === '' ) {
|
||||
$key = '_';
|
||||
}
|
||||
|
||||
// special case for an internal keyword
|
||||
if ( $key == '_element' ) {
|
||||
} elseif ( $key === '_element' ) {
|
||||
$key = 'element';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue