Skip to content

Commit 33d82a6

Browse files
committed
12.04 compatability fix
1 parent c05cb8d commit 33d82a6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

api.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1808,19 +1808,19 @@ protected function convertOutputs(&$sql, &$params, $fields) {
18081808
}
18091809

18101810
protected function convertTypes($result,&$values,&$fields) {
1811-
array_walk($values, function(&$v,$i) use ($result,$fields){
1811+
foreach ($values as $i=>$v) {
18121812
if (is_string($v)) {
18131813
if ($this->db->isNumericType($fields[$i])) {
1814-
$v+=0;
1814+
$values[$i] = $v + 0;
18151815
}
18161816
else if ($this->db->isBinaryType($fields[$i])) {
1817-
$v=base64_encode(hex2bin($v));
1817+
$values[$i] = base64_encode(hex2bin($v));
18181818
}
18191819
else if ($this->db->isJsonType($fields[$i])) {
1820-
$v=$this->db->jsonDecode($v);
1820+
$values[$i] = $this->db->jsonDecode($v);
18211821
}
18221822
}
1823-
});
1823+
}
18241824
}
18251825

18261826
protected function fetchAssoc($result,$fields=false) {

0 commit comments

Comments
 (0)