We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c8dfee commit 27f54c6Copy full SHA for 27f54c6
src/DatingVIP/API/Response.php
@@ -100,7 +100,7 @@ public function set($data)
100
101
case 'json':
102
default:
103
- $this->data = json_decode($data, true) ?: [];
+ $this->data = empty($data) ? [] : (json_decode($data, true) ?: []);
104
$result = json_last_error() == JSON_ERROR_NONE;
105
if (empty ($result)) {
106
throw new RuntimeException ("Error decoding: " . json_last_error_msg ());
0 commit comments