Luis Felipe Schenone has uploaded a new change for review.

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


Change subject: Replaced every HTMLFormField::flattenOptions for 
$this->flattenOptions
......................................................................

Replaced every HTMLFormField::flattenOptions for $this->flattenOptions

As explained in http://stackoverflow.com/questions/999066/, PHP 5.2+
does not allow abstract static methods. Thus I replaced the three
calls to such methods, which were probably causing the bug.

Change-Id: I80d7acfbae72c0bafd2a6e60fdb98bcaa9b439cc
---
M includes/HTMLForm.php
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/07/62007/1

diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php
index 5e3bb06..8f71974 100644
--- a/includes/HTMLForm.php
+++ b/includes/HTMLForm.php
@@ -2015,7 +2015,7 @@
                        return $p;
                }
 
-               $validOptions = HTMLFormField::flattenOptions( 
$this->mParams['options'] );
+               $validOptions = $this->flattenOptions( 
$this->mParams['options'] );
 
                if ( in_array( $value, $validOptions ) ) {
                        return true;
@@ -2081,7 +2081,7 @@
                if ( $value !== false ) {
                        $valInSelect = in_array(
                                $value,
-                               HTMLFormField::flattenOptions( 
$this->mParams['options'] )
+                               $this->flattenOptions( 
$this->mParams['options'] )
                        );
                }
 
@@ -2158,7 +2158,7 @@
 
                # If all options are valid, array_intersect of the valid options
                # and the provided options will return the provided options.
-               $validOptions = HTMLFormField::flattenOptions( 
$this->mParams['options'] );
+               $validOptions = $this->flattenOptions( 
$this->mParams['options'] );
 
                $validValues = array_intersect( $value, $validOptions );
                if ( count( $validValues ) == count( $value ) ) {
@@ -2426,7 +2426,7 @@
                        return false;
                }
 
-               $validOptions = HTMLFormField::flattenOptions( 
$this->mParams['options'] );
+               $validOptions = $this->flattenOptions( 
$this->mParams['options'] );
 
                if ( in_array( $value, $validOptions ) ) {
                        return true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I80d7acfbae72c0bafd2a6e60fdb98bcaa9b439cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Luis Felipe Schenone <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to