Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
Fixed bug that would allow FileStorage to instantiate with 'null' as …
Browse files Browse the repository at this point in the history
…file path.
  • Loading branch information
gsomoza committed Jul 14, 2015
1 parent d2762d9 commit 7178c67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Storage/FileStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class FileStorage implements StorageInterface
*/
public function __construct($path)
{
if (!is_file($path) && !is_writeable(realpath(dirname($path)))) {
if (!is_file($path) || !is_writeable(realpath(dirname($path)))) {
throw new InvalidArgumentException(
'Argument "path" must be a valid path to a file which must be writable.'
);
Expand Down

0 comments on commit 7178c67

Please sign in to comment.