8000 Fixed: Decode empty JSON arrays [] properly. · robholmes/codebird-php@7b7f66a · GitHub
[go: up one dir, main page]

Skip to content

Commit 7b7f66a

Browse files
committed
Fixed: Decode empty JSON arrays [] properly.
1 parent 10f25a8 commit 7b7f66a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

codebird.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ public static function CallApiPost($a, $b, $c)
110110
public static function ParseApiReply($a)
111111
{
112112
$b = array();
113+
if ($a == '[]') {
114+
return $b;
115+
}
113116
if (!$b = json_decode($a, true)) {
114117
if ($a) {
115118
$a = explode('&', $a);

0 commit comments

Comments
 (0)
0