Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
UPDATE check if path is set to prevent warning on empty directory
  • Loading branch information
ggottwald committed Aug 16, 2016
commit 2eea1df4d50c8c1ef4c8e917ec6d5988ecd78945
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ public function isRewindable()
return $this->rewindable;
}

if (empty($this->getPath())) {
return $this->rewindable = false;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A test should probably be added to cover this scenario


if (false !== $stream = @opendir($this->getPath())) {
$infos = stream_get_meta_data($stream);
closedir($stream);
Expand Down