Merge "API: Allow to pass whitespaces in MultiValue"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 29 Jan 2018 15:31:43 +0000 (15:31 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 29 Jan 2018 15:31:43 +0000 (15:31 +0000)
1  2 
includes/api/ApiBase.php

diff --combined includes/api/ApiBase.php
@@@ -1,5 -1,9 +1,5 @@@
  <?php
  /**
 - *
 - *
 - * Created on Sep 5, 2006
 - *
   * Copyright © 2006, 2010 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
   *
   * This program is free software; you can redistribute it and/or modify
@@@ -1404,7 -1408,7 +1404,7 @@@ abstract class ApiBase extends ContextS
        protected function parseMultiValue( $valueName, $value, $allowMultiple, $allowedValues,
                $allSpecifier = null, $limit1 = null, $limit2 = null
        ) {
-               if ( ( trim( $value ) === '' || trim( $value ) === "\x1f" ) && $allowMultiple ) {
+               if ( ( $value === '' || $value === "\x1f" ) && $allowMultiple ) {
                        return [];
                }
                $limit1 = $limit1 ?: self::LIMIT_SML1;