File tree 1 file changed +4
-4
lines changed
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) {
385
385
if ($ this ->db ->count == 0 )
386
386
return null ;
387
387
388
- foreach ($ results as &$ r ) {
388
+ foreach ($ results as $ k => &$ r ) {
389
389
$ this ->processArrays ($ r );
390
390
$ this ->data = $ r ;
391
391
$ this ->processAllWith ($ r , false );
392
392
if ($ this ->returnType == 'Object ' ) {
393
393
$ item = new static ($ r );
394
394
$ item ->isNew = false ;
395
- $ objects [] = $ item ;
395
+ $ objects [$ k ] = $ item ;
396
396
}
397
397
}
398
398
$ this ->_with = Array ();
@@ -476,14 +476,14 @@ private function paginate ($page, $fields = null) {
476
476
self ::$ totalPages = $ this ->db ->totalPages ;
477
477
if ($ this ->db ->count == 0 ) return null ;
478
478
479
- foreach ($ res as &$ r ) {
479
+ foreach ($ res as $ k => &$ r ) {
480
480
$ this ->processArrays ($ r );
481
481
$ this ->data = $ r ;
482
482
$ this ->processAllWith ($ r , false );
483
483
if ($ this ->returnType == 'Object ' ) {
484
484
$ item = new static ($ r );
485
485
$ item ->isNew = false ;
486
- $ objects [] = $ item ;
486
+ $ objects [$ k ] = $ item ;
487
487
}
488
488
}
489
489
$ this ->_with = Array ();
You can’t perform that action at this time.
0 commit comments