Skip to content

Commit

Permalink
fix condition to ensure fstat() returned value is an array
Browse files Browse the repository at this point in the history
  • Loading branch information
l0gicgate committed Apr 30, 2020
1 parent 316ff1c commit 9b51716
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ public function isPipe(): bool
if ($this->stream) {
$stats = fstat($this->stream);

if ($stats) {
if (is_array($stats)) {
$this->isPipe = isset($stats['mode']) && ($stats['mode'] & self::FSTAT_MODE_S_IFIFO) !== 0;
}
}
Expand Down

0 comments on commit 9b51716

Please sign in to comment.