diff --git a/src/Flow/ETL/Rows.php b/src/Flow/ETL/Rows.php index fcfa917e0..a93c5b00b 100644 --- a/src/Flow/ETL/Rows.php +++ b/src/Flow/ETL/Rows.php @@ -319,6 +319,10 @@ public function count() : int */ public function chunks(int $size) : array { + if ($size < 1) { + throw InvalidArgumentException::because('Chunk size must be greater than 0'); + } + $chunks = []; foreach (\array_chunk($this->rows, $size) as $chunk) {