Skip to content

Commit 13afb8c

Browse files
committed
QueryResult::fetch() returns FALSE when all entries are explored
1 parent f457bef commit 13afb8c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/JSONDB/QueryResult.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ public function offsetUnset($offset)
261261
/**
262262
* Fetch for results
263263
* @param int $mode The fetch mode
264-
* @return array|QueryResultObject|null
264+
* @return array|QueryResultObject|bool
265265
* @throws Exception
266266
*/
267267
public function fetch($mode = NULL)
@@ -276,7 +276,7 @@ public function fetch($mode = NULL)
276276
++$this->key;
277277
return $return;
278278
}
279-
return NULL;
279+
return FALSE;
280280
} else {
281281
throw new Exception("JSONDB Query Result Error: Can't fetch for results without execute the query.");
282282
}

0 commit comments

Comments
 (0)