8000 Update JsonBundleReader.php · symfony/symfony@22a6642 · GitHub
[go: up one dir, main page]

Skip to content

Commit 22a6642

Browse files
ksjogonicolas-grekas
authored andcommitted
Update JsonBundleReader.php
1 parent 0b613db commit 22a6642

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/Symfony/Component/Intl/Data/Bundle/Reader/JsonBundleReader.php

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,24 @@ public function read($path, $locale)
3232

3333
if (!file_exists($fileName)) {
3434
throw new ResourceBundleNotFoundException(sprintf(
35-
'The resource bundle "%s/%s.json" does not exist.',
36-
$path,
37-
$locale
35+
'The resource bundle "%s" does not exist.',
36+
$fileName
3837
));
3938
}
4039

4140
if (!is_file($fileName)) {
4241
throw new RuntimeException(sprintf(
43-
'The resource bundle "%s/%s.json" is not a file.',
44-
$path,
45-
$locale
42+
'The resource bundle "%s" is not a file.',
43+
$fileName
4644
));
4745
}
4846

4947
$data = json_decode(file_get_contents($fileName), true);
5048

5149
if (null === $data) {
5250
throw new RuntimeException(sprintf(
53-
'The resource bundle "%s/%s.json" contains invalid JSON: %s',
54-
$path,
55-
$locale,
51+
'The resource bundle "%s" contains invalid JSON: %s',
52+
$fileName,
5653
self::getLastJsonError()
5754
));
5855
}

0 commit comments

Comments
 (0)
0