- // check if we are inside an array or struct:
- // if value just built is inside an array, let's move it into array on the stack
- $vscount = count($this->_xh['valuestack']);
- if ($vscount && $this->_xh['valuestack'][$vscount - 1]['type'] == 'ARRAY') {
- $this->_xh['valuestack'][$vscount - 1]['values'][] = $temp;
- } else {
- $this->_xh['value'] = $temp;
+ $this->_xh['value'] = $temp;
+ } elseif ($rebuildXmlrpcvals < 0) {
+ if ($this->_xh['vt'] == Value::$xmlrpcDateTime) {
+ $this->_xh['value'] = (object)array(
+ 'xmlrpc_type' => 'datetime',
+ 'scalar' => $this->_xh['value'],
+ 'timestamp' => \PhpXmlRpc\Helper\Date::iso8601Decode($this->_xh['value'])
+ );
+ } elseif ($this->_xh['vt'] == Value::$xmlrpcBase64) {
+ $this->_xh['value'] = (object)array(
+ 'xmlrpc_type' => 'base64',
+ 'scalar' => $this->_xh['value']
+ );