Skip to content

Commit 37c6efa

Browse files
Add debug output for JSON decode error
1 parent c460645 commit 37c6efa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

code/user_agent_parse.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
# -- Try to decode the api response as json
6363
$result_json = json_decode($result);
6464
if ($result_json === null) {
65+
echo $result;
6566
echo "Couldn't decode the response as JSON\n";
6667
exit();
6768
}

0 commit comments

Comments
 (0)