From: Roan Kattouw Date: Wed, 10 Dec 2008 14:12:54 +0000 (+0000) Subject: API: (bug 16581) Fix regression from r44015 ("Various minor cleanup") which changed... X-Git-Tag: 1.31.0-rc.0~44068 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=7c6e96a734ef1bc8ea80f71f0861096e205d0794;p=lhc%2Fweb%2Fwiklou.git API: (bug 16581) Fix regression from r44015 ("Various minor cleanup") which changed Article::replaceSection() to treat $section=null as $section=0 rather than $section='' as it did before, causing a nasty API edit bug. When changing a function's behavior, please update the callers, and don't forget the API. --- diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php index acd657979d..c69d506b53 100644 --- a/includes/api/ApiEditPage.php +++ b/includes/api/ApiEditPage.php @@ -116,6 +116,8 @@ class ApiEditPage extends ApiBase { $this->dieUsage("The section parameter must be set to an integer or 'new'", "invalidsection"); $reqArr['wpSection'] = $params['section']; } + else + $reqArr['wpSection'] = ''; if($params['watch']) $watch = true;