merged branch makasim/yaml-throw-not-readable (PR #3105)
Commits -------7961014
[Yaml][Parser] changes according reviewefce640
[Yaml][Parser] throw an exception if not readable Discussion ---------- [Yaml][Parser] throw an exception if service file not readable. Bug fix: no Feature addition: yes Backwards compatibility break: no Symfony2 tests pass: yes Fixes the following tickets: #3077 Todo: - --------------------------------------------------------------------------- by makasim at 2012-01-13T15:49:49Z @fabpot done
This commit is contained in:
commit
119a24f016
@ -47,7 +47,11 @@ class Yaml
|
|||||||
$file = '';
|
$file = '';
|
||||||
|
|
||||||
// if input is a file, process it
|
// if input is a file, process it
|
||||||
if (strpos($input, "\n") === false && is_file($input) && is_readable($input)) {
|
if (strpos($input, "\n") === false && is_file($input)) {
|
||||||
|
if (false === is_readable($input)) {
|
||||||
|
throw new ParseException(sprintf('Unable to parse "%s" as the file is not readable.', $input));
|
||||||
|
}
|
||||||
|
|
||||||
$file = $input;
|
$file = $input;
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
Reference in New Issue
Block a user