Skip to content

Commit 0419fff

Browse files
committed
Return empty array when no items to pop
1 parent 2db38a7 commit 0419fff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

projects/packages/sync/src/class-queue.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ public function pop( $limit ) {
271271
$items = $this->fetch_items( $limit );
272272

273273
if ( ! $items ) {
274-
return;
274+
return array();
275275
}
276276

277277
$ids = $this->get_ids( $items );
@@ -292,7 +292,7 @@ public function pop_newest( $limit ) {
292292
$items = $this->fetch_items( $limit, 'DESC' );
293293

294294
if ( ! $items ) {
295-
return;
295+
return array();
296296
}
297297

298298
$ids = $this->get_ids( $items );

0 commit comments

Comments
 (0)