diff options
-rw-r--r-- | zend/value.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/zend/value.cpp b/zend/value.cpp index 3f38498..50c4b64 100644 --- a/zend/value.cpp +++ b/zend/value.cpp @@ -1708,15 +1708,10 @@ std::map<std::string,Php::Value> Value::mapValue() const { // result variable std::map<std::string,Php::Value> result; - + // iterate over the object - 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; - } - + for (auto &iter : *this) result[iter.first.stringValue()] = iter.second; + // done return result; } |