mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-12 09:10:32 +00:00
Change a condition with == to something more precise
It can be both NULL and an empty string here. Tests for both cases are added in the following patches: Ia6c10419a7a92dac642db6ea21908927a5830b69 Ibb3bb1ab3450a34889dcd66b34542f2dd25fdc2b Change-Id: Ia2b2b6545bb889de59a363a2c1d7569cbc971361
This commit is contained in:
parent
469217073a
commit
adf113af86
|
@ -299,12 +299,12 @@ class Cite {
|
|||
# <ref ...></ref>. This construct is invalid if
|
||||
# it's a contentful ref, but OK if it's a named duplicate and should
|
||||
# be equivalent <ref ... />, for compatability with #tag.
|
||||
if ( $key == false ) {
|
||||
if ( is_string( $key ) && $key !== '' ) {
|
||||
$str = null;
|
||||
} else {
|
||||
$this->mRefCallStack[] = false;
|
||||
|
||||
return $this->error( 'cite_error_ref_no_input' );
|
||||
} else {
|
||||
$str = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue