Skip to content

Commit 7cc69c7

Browse files
committed
Check for empty body before commit
1 parent 401dbf6 commit 7cc69c7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Classes/Bulk.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,10 @@ public function reset()
236236
public function commit()
237237
{
238238

239+
if (empty($this->body)) {
240+
return false;
241+
}
242+
239243
$result = $this->query->connection->bulk($this->body);
240244
$this->operationCount = 0;
241245
$this->body = [];

0 commit comments

Comments
 (0)