Skip to content

Commit

Permalink
[hotfix/ZF-11356]
Browse files Browse the repository at this point in the history
Update Zend\Json\Encoder::_encodeObject to encode the object's class name using _encodeString
  • Loading branch information
adamlundrigan committed Aug 31, 2011
1 parent e10ae0f commit c92553c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions library/Zend/Json/Encoder.php
Expand Up @@ -165,8 +165,9 @@ protected function _encodeObject(&$value)
}
}

return '{"__className":"'
. str_replace('\\', '\\\\', get_class($value)) . '"'
$className = get_class($value);
return '{"__className":'
. $this->_encodeString($className)
. $props . '}';
}

Expand Down

0 comments on commit c92553c

Please sign in to comment.