1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-07-27 19:50:21 +02:00

Skip loading offset on empty filter

This commit is contained in:
Barry vd. Heuvel
2014-01-13 21:13:04 +01:00
parent dbfceb732c
commit 6103ddabf2

View File

@@ -67,7 +67,13 @@ class FileStorage implements StorageInterface
//Load the metadata and filter the results.
$results = array();
$i = 0;
foreach ($files as $file) {
//When filter is empty, skip loading the offset
if($i++ < $offset && empty($filters)){
$results[] = null;
continue;
}
$data = $this->get($file['id']);
$meta = $data['__meta'];
unset($data);