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 6433172 commit 4f8ee70Copy full SHA for 4f8ee70
helper.php
@@ -201,10 +201,12 @@ public function getPages($schema = null)
201
* @param string $value
202
* @return mixed
203
* @throws StructException
204
+ * @throws JsonException
205
*/
206
public static function decodeJson($value)
207
{
- if (!empty($value) && $value[0] !== '[') throw new StructException('Lookup expects JSON');
208
+ if (empty($value)) return $value;
209
+ if ($value[0] !== '[') throw new StructException('Lookup expects JSON');
210
return json_decode($value, null, 512, JSON_THROW_ON_ERROR);
211
}
212
0 commit comments