minor #14954 fix Merge branch '2.7' into 2.8 JsonFileLoader (gimler)
This PR was merged into the 2.8 branch. Discussion ---------- fix Merge branch '2.7' into 2.8 JsonFileLoader This fix a merge commit see5593bdd56e
. The `stream_is_local` and `file_exists` checks are all ready done in the parent `FileLoader` class. | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | no | Fixed tickets | none | License | MIT | Doc PR | none Commits -------692deff
fix Merge branch '2.7' into 2.8 JsonFileLoader
This commit is contained in:
commit
5f36605e0e
@ -25,14 +25,6 @@ class JsonFileLoader extends FileLoader
|
|||||||
*/
|
*/
|
||||||
protected function loadResource($resource)
|
protected function loadResource($resource)
|
||||||
{
|
{
|
||||||
if (!stream_is_local($resource)) {
|
|
||||||
throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!file_exists($resource)) {
|
|
||||||
throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource));
|
|
||||||
}
|
|
||||||
|
|
||||||
$messages = array();
|
$messages = array();
|
||||||
if ($data = file_get_contents($resource)) {
|
if ($data = file_get_contents($resource)) {
|
||||||
$messages = json_decode($data, true);
|
$messages = json_decode($data, true);
|
||||||
|
Reference in New Issue
Block a user