reset array pointers

This commit is contained in:
f0o
2016-02-11 07:42:00 +00:00
parent c767a26732
commit 568875ad83
4 changed files with 6 additions and 0 deletions
+1
View File
@@ -97,6 +97,7 @@ class ObjCache implements ArrayAccess {
else {
$GLOBALS['_ObjCache'][$this->obj][$obj]['value'] = dbFetchRows($this->data[$obj]['query'], $this->data[$obj]['params']);
if (sizeof($GLOBALS['_ObjCache'][$this->obj][$obj]['value']) == 1 && sizeof($GLOBALS['_ObjCache'][$this->obj][$obj]['value'][0]) == 1) {
reset($GLOBALS['_ObjCache'][$this->obj][$obj]['value'][0]);
$GLOBALS['_ObjCache'][$this->obj][$obj]['value'] = current($GLOBALS['_ObjCache'][$this->obj][$obj]['value'][0]);
}
return $GLOBALS['_ObjCache'][$this->obj][$obj]['value'];