|
|
@@ -77,17 +77,14 @@ class Zend_Serializer_Adapter_Json extends Zend_Serializer_Adapter_AdapterAbstra
|
|
|
|
|
|
try {
|
|
|
$ret = Zend_Json::decode($json, $opts['objectDecodeType']);
|
|
|
+ } catch (Zend_Json_Exception $e) {
|
|
|
+ require_once 'Zend/Serializer/Exception.php';
|
|
|
+ throw new Zend_Serializer_Exception('Invalid json data');
|
|
|
} catch (Exception $e) {
|
|
|
require_once 'Zend/Serializer/Exception.php';
|
|
|
throw new Zend_Serializer_Exception('Unserialization failed by previous error', 0, $e);
|
|
|
}
|
|
|
|
|
|
- // json_decode returns null for invalid JSON
|
|
|
- if ($ret === null && $json !== 'null') {
|
|
|
- require_once 'Zend/Serializer/Exception.php';
|
|
|
- throw new Zend_Serializer_Exception('Invalid json data');
|
|
|
- }
|
|
|
-
|
|
|
return $ret;
|
|
|
}
|
|
|
}
|