From: Tim Starling Date: Wed, 18 Feb 2009 12:41:28 +0000 (+0000) Subject: Proposed fix for bug 17552. Also the name of the function should be changed, because... X-Git-Tag: 1.31.0-rc.0~42805 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=7fa617fcfd51068512fb9df1ee11d05d9044cb88;p=lhc%2Fweb%2Fwiklou.git Proposed fix for bug 17552. Also the name of the function should be changed, because there's nothing internal about it. --- diff --git a/includes/api/ApiResult.php b/includes/api/ApiResult.php index a796d74c71..f8fa56a20d 100644 --- a/includes/api/ApiResult.php +++ b/includes/api/ApiResult.php @@ -221,8 +221,12 @@ class ApiResult extends ApiBase { */ public function setIndexedTagName_internal( $path, $tag ) { $data = & $this->mData; - foreach((array)$path as $p) + foreach((array)$path as $p) { + if ( !isset( $data[$p] ) ) { + $data[$p] = array(); + } $data = & $data[$p]; + } if(is_null($data)) return; $this->setIndexedTagName($data, $tag);