jenkins-bot has submitted this change and it was merged.

Change subject: Replace == with test for isset and empty string
......................................................................


Replace == with test for isset and empty string

The coding conventions suggest avoiding ==,
and for this condition definedness is actually more relevant
than whether the string has any text, but since
the string can also be '0', checking for !$text doesn't work.

Similar to I15b422d3345bf4522e68a17dce9682ff28484559 .

Change-Id: Ib823678b639bf4f1a92dffcd9e41c780b56ab128
---
M Cite_body.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jforrester: Looks good to me, approved
  Thiemo Mättig (WMDE): Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/Cite_body.php b/Cite_body.php
index c28f3f8..8cb406f 100644
--- a/Cite_body.php
+++ b/Cite_body.php
@@ -779,7 +779,7 @@
         * @return String
         */
        function referenceText( $key, $text ) {
-               if ( $text == '' ) {
+               if ( !isset( $text ) || $text === '' ) {
                        return $this->error( 'cite_error_references_no_text', 
$key, 'noparse' );
                }
                return '<span class="reference-text">' . rtrim( $text, "\n" ) . 
"</span>\n";

-- 
To view, visit https://gerrit.wikimedia.org/r/164086
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib823678b639bf4f1a92dffcd9e41c780b56ab128
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Amire80 <amir.ahar...@mail.huji.ac.il>
Gerrit-Reviewer: Jackmcbarn <jackmcb...@gmail.com>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to