mirror of
https://github.com/Respect/Validation.git
synced 2024-06-09 01:02:16 +02:00
Drop support for PHP 5.3
This commit is contained in:
parent
ac8fb50400
commit
06ecd9c063
|
@ -5,7 +5,6 @@ language:
|
|||
php
|
||||
|
||||
php:
|
||||
- 5.3
|
||||
- 5.4
|
||||
- 5.5
|
||||
- 5.6
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.3.6"
|
||||
"php": ">=5.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"egulias/email-validator": "~1.2",
|
||||
|
|
|
@ -106,12 +106,7 @@ class ValidationException extends InvalidArgumentException implements Validation
|
|||
}
|
||||
}
|
||||
|
||||
$options = 0;
|
||||
if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
|
||||
$options = (JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
|
||||
return (@json_encode($value, $options) ?: $value);
|
||||
return (@json_encode($value, (JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)) ?: $value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue