forked from LiveCarta/PayPal-PHP-SDK
@@ -5,6 +5,7 @@ php:
|
||||
- 5.4
|
||||
- 5.5
|
||||
- 5.6
|
||||
- 7.0
|
||||
- hhvm
|
||||
matrix:
|
||||
allow_failures:
|
||||
|
||||
@@ -21,6 +21,9 @@ class JsonValidator
|
||||
{
|
||||
@json_decode($string);
|
||||
if (json_last_error() != JSON_ERROR_NONE) {
|
||||
if ($string === '' || $string === null) {
|
||||
return true;
|
||||
}
|
||||
if ($silent == false) {
|
||||
//Throw an Exception for string or array
|
||||
throw new \InvalidArgumentException("Invalid JSON String");
|
||||
|
||||
Reference in New Issue
Block a user