Skip to content

Commit

Permalink
Merge pull request #20 from rubenexp/bugfix/missing_file
Browse files Browse the repository at this point in the history
[BUGFIX][BACI-391] - Fix error "Cannot open file for write dictionary…
  • Loading branch information
lewisvoncken authored Jan 27, 2021
2 parents d9dc62c + 72560cb commit 98ae468
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Module/I18n/Dictionary/Writer/Csv.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Csv implements WriterInterface
*/
public function __construct($outputFilename)
{
if (!file_exists($outputFilename) || false === ($fileHandler = fopen($outputFilename, 'w'))) {
if (false === ($fileHandler = fopen($outputFilename, 'w')) || !file_exists($outputFilename)) {
throw new \InvalidArgumentException(
sprintf('Cannot open file for write dictionary: "%s"', $outputFilename)
);
Expand Down

0 comments on commit 98ae468

Please sign in to comment.