Skip to content

Commit 966e692

Browse files
committed
Consider byte steraming errors in WP_Byte_Reader::read_all()
1 parent 9648e97 commit 966e692

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/WordPress/ByteReader/WP_Byte_Reader.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ public function read_all(): string {
1818
while( $this->next_bytes() ) {
1919
$buffer .= $this->get_bytes();
2020
}
21+
if( $this->get_last_error() ) {
22+
return false;
23+
}
2124
return $buffer;
2225
}
2326
}

0 commit comments

Comments
 (0)