Details
-
Bug
-
Resolution: Obsolete
-
Medium
-
None
-
2014.03
-
Ubuntu 13.04
Apache 2.4
PHP 5.5.3
MySQL: 5.1.66
Description
After update to 2014.03 version, when functional tests are launched in my own project the path of tr files is wrong so I get the following error:
file_get_contents(eZ/Publish/Core/Persistence/Tests/TransformationProcessor/_fixtures/transformations/ascii.tr): failed to open stream: No such file or directory .../vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/TransformationProcessor/DefinitionBased/Parser.php:92
The error is thrown in parse() method:
public function parse( $file ) { return $this->parseString( file_get_contents( $file ) ); }
A fast solution should be to check if the file exists before to launch the parseString method. Something like that:
public function parse( $file ) { if( !is_file($file) ) { return array(); } return $this->parseString( file_get_contents( $file ) ); }
Pull request is located at https://github.com/ezsystems/ezpublish-kernel/pull/888