shoppingflux / shoppingfluxexport

7 stars 7 forks source link

unlink should not be used without file_exists #389

Closed ghost closed 5 years ago

ghost commented 6 years ago

Expected behaviour

In shoppingfluxexport.php we are using unlink() to remove feed.xml. it should be used only if the file exists to avoid error with the function on specific configuration.

Such as:

            if (file_exists($this->getFeedName(false))) {
                unlink($this->getFeedName(false));
            }

Actual behaviour

We are not using file_exists()

Steps to reproduce the behaviour

We didn't find specific use case for that. But this is interrupting the feed generation for a specific user.