@@ -137,9 +137,9 @@ private static function encapsulate($mixed)
137
137
$ instance = new dbObject (self ::getInstance ()->query ($ mixed ), array ("key " => $ key ));
138
138
self ::$ object [$ key ] = $ instance ;
139
139
}
140
- if (self ::$ object [$ key ]->extra ["rows " ] == = self ::$ object [$ key ]->extra ["totalEntries " ]) {
140
+ if (self ::$ object [$ key ]->extra ["rows " ] + 1 == self :: $ object [ $ key ]-> extra [ " totalEntries " ] || self :: $ object [ $ key ]-> extra [ " rows " ] + 1 > = self ::$ object [$ key ]->extra ["totalEntries " ]) {
141
141
unset(self ::$ object [$ key ]);
142
- return false ;
142
+ return self :: encapsulate ( $ mixed ) ;
143
143
}
144
144
return self ::$ object [$ key ];
145
145
}
@@ -162,7 +162,8 @@ public static function fetch($mixed, $simple = false)
162
162
}
163
163
}
164
164
$ mixed = self ::encapsulate ($ mixed );
165
- return ($ mixed ? $ mixed ->getData () : $ mixed );
165
+ return $ mixed ->getData ();
166
+ //return ($mixed ? $mixed->getData() : $mixed);
166
167
}
167
168
if ($ mixed instanceof dbObject) {
168
169
return $ mixed ->getData ();
0 commit comments