From 9b51716404e1623b9d72c56cac75883f72696f97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20B=C3=A9rub=C3=A9?= Date: Thu, 30 Apr 2020 15:49:50 -0600 Subject: [PATCH] fix condition to ensure fstat() returned value is an array --- src/Stream.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Stream.php b/src/Stream.php index 69f5ed8..aafba8e 100644 --- a/src/Stream.php +++ b/src/Stream.php @@ -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; } }