Don't pass $this by reference
[lhc/web/wiklou.git] / includes / api / ApiQueryUserInfo.php
index 112fbb3..d57548e 100644 (file)
@@ -101,12 +101,10 @@ class ApiQueryUserInfo extends ApiQueryBase {
                        $vals['options'] = $wgUser->getOptions();
                }
 
-               if (
-                       isset( $this->prop['preferencestoken'] ) &&
+               if ( isset( $this->prop['preferencestoken'] ) &&
                        is_null( $this->getMain()->getRequest()->getVal( 'callback' ) )
-               )
-               {
-                       $vals['preferencestoken'] = $wgUser->editToken();
+               ) {
+                       $vals['preferencestoken'] = $wgUser->editToken( '', $this->getMain()->getRequest() );
                }
 
                if ( isset( $this->prop['editcount'] ) ) {