From: Aaron Schulz Date: Fri, 21 Mar 2008 06:28:02 +0000 (+0000) Subject: $value should come in as a string (if it doesn't, trim() will cast it to one anyway... X-Git-Tag: 1.31.0-rc.0~48903 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=7389d070572b08048132043ebecd10ad70a9b2ef;p=lhc%2Fweb%2Fwiklou.git $value should come in as a string (if it doesn't, trim() will cast it to one anyway). Once trimmed, a truly empty list should be "" not "0". This fixes the massive namespace param breakage. --- diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index cc88e97320..7568157d8b 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -503,7 +503,7 @@ abstract class ApiBase { * @return (allowMultiple ? an_array_of_values : a_single_value) */ protected function parseMultiValue($valueName, $value, $allowMultiple, $allowedValues) { - if( !trim( $value ) ) + if( trim($value) === "" ) return array(); $valuesList = explode('|', $value); if (!$allowMultiple && count($valuesList) != 1) {