Commit 0b038cf8 authored by Kristian Feldsam's avatar Kristian Feldsam
Browse files

Fixed XML to Array conversion


Signed-off-by: Kristian Feldsam's avatarKristian Feldsam <feldsam@gmail.com>
parent 82ac836e
......@@ -121,10 +121,10 @@ class OneBase {
}
$child[$ak] = (string) $av;
}
if (!in_array($k, array_keys($ar))) {
if (!array_key_exists($k, $ar)) {
$ar[$k] = $child;
} else {
if (isset($ar[$k][0])) {
if (!is_string($ar[$k]) && isset($ar[$k][0])) {
$ar[$k][] = $child;
} else {
$ar[$k] = array($ar[$k]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment