Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/356461 )

Change subject: Avoid error suppressing
......................................................................

Avoid error suppressing

Silencing errors is discouraged

Change-Id: I6c94a25fd4a867196f00da03df802b88ce6f2e95
---
M includes/pages/VotePage.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll 
refs/changes/61/356461/1

diff --git a/includes/pages/VotePage.php b/includes/pages/VotePage.php
index 8cc5777..b1c01ac 100644
--- a/includes/pages/VotePage.php
+++ b/includes/pages/VotePage.php
@@ -178,9 +178,9 @@
                );
 
                # Add vote to log
-               $xff = @$_SERVER['HTTP_X_FORWARDED_FOR'];
-               if ( !$xff ) {
-                       $xff = '';
+               $xff = '';
+               if ( !empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
+                       $xff = $_SERVER['HTTP_X_FORWARDED_FOR'];
                }
 
                $tokenMatch = $this->specialPage->getEditToken() == 
$request->getVal( 'edit_token' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c94a25fd4a867196f00da03df802b88ce6f2e95
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SecurePoll
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>

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

Reply via email to