File tree 1 file changed +2
-10
lines changed
1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change 18
18
use function call_user_func ;
19
19
use function count ;
20
20
use function explode ;
21
- use function function_exists ;
22
21
use function get_debug_type ;
23
22
use function is_array ;
24
23
use function is_callable ;
@@ -601,22 +600,15 @@ protected function processBodyContent(mixed $request)
601
600
/**
602
601
* Decode a JSON string.
603
602
*
604
- * Uses json_decode by default. If that is not available, raises an exception.
603
+ * Uses json_decode by default.
605
604
*
606
605
* Marked protected to allow usage from extending classes.
607
606
*
608
607
* @param string $string
609
608
* @return mixed
610
- * @throws Exception\DomainException If no JSON decoding functionality is available.
611
609
*/
612
610
protected function jsonDecode ($ string )
613
611
{
614
- if (function_exists ('json_decode ' )) {
615
- return json_decode ($ string , (bool ) $ this ->jsonDecodeType );
616
- }
617
-
618
- throw new DomainException (
619
- 'Unable to parse JSON request, due to missing ext/json '
620
- );
612
+ return json_decode ($ string , (bool ) $ this ->jsonDecodeType );
621
613
}
622
614
}
You can’t perform that action at this time.
0 commit comments