File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -385,14 +385,14 @@ protected function get ($limit = null, $fields = null) {
385385 if ($ this ->db ->count == 0 )
386386 return null ;
387387
388- foreach ($ results as &$ r ) {
388+ foreach ($ results as $ k => &$ r ) {
389389 $ this ->processArrays ($ r );
390390 $ this ->data = $ r ;
391391 $ this ->processAllWith ($ r , false );
392392 if ($ this ->returnType == 'Object ' ) {
393393 $ item = new static ($ r );
394394 $ item ->isNew = false ;
395- $ objects [] = $ item ;
395+ $ objects [$ k ] = $ item ;
396396 }
397397 }
398398 $ this ->_with = Array ();
@@ -476,14 +476,14 @@ private function paginate ($page, $fields = null) {
476476 self ::$ totalPages = $ this ->db ->totalPages ;
477477 if ($ this ->db ->count == 0 ) return null ;
478478
479- foreach ($ res as &$ r ) {
479+ foreach ($ res as $ k => &$ r ) {
480480 $ this ->processArrays ($ r );
481481 $ this ->data = $ r ;
482482 $ this ->processAllWith ($ r , false );
483483 if ($ this ->returnType == 'Object ' ) {
484484 $ item = new static ($ r );
485485 $ item ->isNew = false ;
486- $ objects [] = $ item ;
486+ $ objects [$ k ] = $ item ;
487487 }
488488 }
489489 $ this ->_with = Array ();
You can’t perform that action at this time.
0 commit comments