Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions library/Zend/Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ class Zend_Json
public static function decode($encodedValue, $objectDecodeType = Zend_Json::TYPE_ARRAY)
{
$encodedValue = (string) $encodedValue;
// fix for php7 (empty strings result in syntax error for php >= 7.0.0 if calling json_last_error)
if (empty($encodedValue)) {
return null;
}

if (function_exists('json_decode') && self::$useBuiltinEncoderDecoder !== true) {
$decode = json_decode($encodedValue, $objectDecodeType);

Expand Down