Hoo man has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/76941


Change subject: Make sure a session has been started prior to using it
......................................................................

Make sure a session has been started prior to using it

Thanks Anomie for pointing this out.

Change-Id: Ieaa9847e74c35e3080dabeaef8895209bfcc675b
---
M AbuseFilter.class.php
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter 
refs/changes/41/76941/1

diff --git a/AbuseFilter.class.php b/AbuseFilter.class.php
index 3eaf0bd..f148c82 100644
--- a/AbuseFilter.class.php
+++ b/AbuseFilter.class.php
@@ -745,6 +745,12 @@
                        if ( !empty( $actions['warn'] ) ) {
                                $parameters = $actions['warn']['parameters'];
                                $warnKey = 'abusefilter-warned-' . 
md5($title->getPrefixedText()) . '-' . $filter;
+
+                               // Make sure the session is started prior to 
using it
+                               if ( session_id() === '' ) {
+                                       wfSetupSession();
+                               }
+
                                if ( !isset( $_SESSION[$warnKey] ) || 
!$_SESSION[$warnKey] ) {
                                        $_SESSION[$warnKey] = true;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieaa9847e74c35e3080dabeaef8895209bfcc675b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Hoo man <h...@online.de>

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

Reply via email to