Update JsonBundleReader.php
This commit is contained in:
parent
0b613dbb57
commit
22a6642632
|
@ -32,17 +32,15 @@ class JsonBundleReader implements BundleReaderInterface
|
||||||
|
|
||||||
if (!file_exists($fileName)) {
|
if (!file_exists($fileName)) {
|
||||||
throw new ResourceBundleNotFoundException(sprintf(
|
throw new ResourceBundleNotFoundException(sprintf(
|
||||||
'The resource bundle "%s/%s.json" does not exist.',
|
'The resource bundle "%s" does not exist.',
|
||||||
$path,
|
$fileName
|
||||||
$locale
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_file($fileName)) {
|
if (!is_file($fileName)) {
|
||||||
throw new RuntimeException(sprintf(
|
throw new RuntimeException(sprintf(
|
||||||
'The resource bundle "%s/%s.json" is not a file.',
|
'The resource bundle "%s" is not a file.',
|
||||||
$path,
|
$fileName
|
||||||
$locale
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,9 +48,8 @@ class JsonBundleReader implements BundleReaderInterface
|
||||||
|
|
||||||
if (null === $data) {
|
if (null === $data) {
|
||||||
throw new RuntimeException(sprintf(
|
throw new RuntimeException(sprintf(
|
||||||
'The resource bundle "%s/%s.json" contains invalid JSON: %s',
|
'The resource bundle "%s" contains invalid JSON: %s',
|
||||||
$path,
|
$fileName,
|
||||||
$locale,
|
|
||||||
self::getLastJsonError()
|
self::getLastJsonError()
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue