This repository was archived by the owner on May 16, 2018. It is now read-only.
This repository was archived by the owner on May 16, 2018. It is now read-only.
Zend_Json::decode null or empty string throw Zend_Json_Exception on PHP7 #678
Closed
Description
I have the following code that works on php 5.6 but throws Zend_Json_Exception on PHP7.
Zend_Json::decode(null);
Zend_Json::decode('');
Each call causes Zend_Json_Exception.
Zend_Json_Exception: Decoding failed: Syntax error
This bug caused by https://bugs.php.net/bug.php?id=71718
Code:
Zend_Json::$useBuiltinEncoderDecoder = true;
Zend_Json::decode(null);
Zend_Json::decode('');
runs without exceptions.