From 7389d070572b08048132043ebecd10ad70a9b2ef Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 21 Mar 2008 06:28:02 +0000 Subject: [PATCH] $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. --- includes/api/ApiBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.20.1