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