aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api/ApiResult.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/api/ApiResult.php')
-rw-r--r--includes/api/ApiResult.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/api/ApiResult.php b/includes/api/ApiResult.php
index 490b8310dcad..5db8ca71ad60 100644
--- a/includes/api/ApiResult.php
+++ b/includes/api/ApiResult.php
@@ -180,7 +180,9 @@ class ApiResult implements ApiSerializable {
* Clear the current result data.
*/
public function reset() {
- $this->data = array();
+ $this->data = array(
+ self::META_TYPE => 'assoc', // Usually what's desired
+ );
$this->size = 0;
}
@@ -1242,7 +1244,7 @@ class ApiResult implements ApiSerializable {
}
/**
- * Alias for self::defineIndexedTagName()
+ * Alias for self::addIndexedTagName()
* @deprecated since 1.25, use $this->addIndexedTagName() instead
* @param array $path Path to the array, like addValue()'s $path
* @param string $tag