From 966e6926256dc56c8473c6257d0d474be0f20811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Zieli=C5=84ski?= Date: Mon, 16 Dec 2024 22:34:36 +0100 Subject: [PATCH] Consider byte steraming errors in WP_Byte_Reader::read_all() --- src/WordPress/ByteReader/WP_Byte_Reader.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/WordPress/ByteReader/WP_Byte_Reader.php b/src/WordPress/ByteReader/WP_Byte_Reader.php index dc47f733..75ee7d88 100644 --- a/src/WordPress/ByteReader/WP_Byte_Reader.php +++ b/src/WordPress/ByteReader/WP_Byte_Reader.php @@ -18,6 +18,9 @@ public function read_all(): string { while( $this->next_bytes() ) { $buffer .= $this->get_bytes(); } + if( $this->get_last_error() ) { + return false; + } return $buffer; } }