Skip to content

Commit

Permalink
dont error when working with empty file names
Browse files Browse the repository at this point in the history
  • Loading branch information
icewind1991 committed May 27, 2020
1 parent ed09f6c commit 80921d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Native/NativeFileInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function isReadOnly() {
public function isHidden() {
$mode = $this->getMode();
if ($mode > 0x80) {
return $this->name[0] === '.';
return strlen($this->name) > 0 && $this->name[0] === '.';
} else {
return (bool)($mode & IFileInfo::MODE_HIDDEN);
}
Expand Down

0 comments on commit 80921d6

Please sign in to comment.