summaryrefslogtreecommitdiff
path: root/zend/value.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zend/value.cpp')
-rw-r--r--zend/value.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/zend/value.cpp b/zend/value.cpp
index 61efe2f..3f38498 100644
--- a/zend/value.cpp
+++ b/zend/value.cpp
@@ -1710,7 +1710,12 @@ std::map<std::string,Php::Value> Value::mapValue() const
std::map<std::string,Php::Value> result;
// iterate over the object
- for (auto &iter : *this) result[iter.first.rawValue()] = iter.second;
+ for (auto &iter : *this)
+ {
+ auto &key = iter.first;
+ if (key.isNumeric()) result[std::to_string(key.numericValue())] = iter.second;
+ else result[iter.first.rawValue()] = iter.second;
+ }
// done
return result;