From e484ef763dc3da3e98ff1f2ebd3f8aa6309d8cb5 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Mon, 27 Apr 2009 14:21:16 +0000 Subject: [PATCH] API: Fix regression from r32224 with caused bug 18597 (internal error for empty generator= parameter) --- RELEASE-NOTES | 1 + includes/api/ApiBase.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 24b9dca4c2..05900b190e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -437,6 +437,7 @@ The following extensions are migrated into MediaWiki 1.15: users * (bug 13049) "API must be accessed from the primary script entry point" error * (bug 18601) generator=backlinks returns invalid continue parameter +* (bug 18597) Internal error with empty generator= parameter === Languages updated in 1.15 === diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index fc221bd63a..4f86832f1a 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -610,7 +610,7 @@ abstract class ApiBase { * @return mixed (allowMultiple ? an_array_of_values : a_single_value) */ protected function parseMultiValue($valueName, $value, $allowMultiple, $allowedValues) { - if( trim($value) === "" ) + if( trim($value) === "" && $allowMultiple) return array(); $sizeLimit = $this->mMainModule->canApiHighLimits() ? self::LIMIT_SML2 : self::LIMIT_SML1; $valuesList = explode('|', $value, $sizeLimit + 1); -- 2.20.1