Skip to content

Commit f081b0b

Browse files
grossmannmartin66Ton99
authored andcommitted
fixed order of arguments in implode function
1 parent d69a186 commit f081b0b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/Model/JsModelAbstract.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public static function phpValueToJs($value)
5454
$jsObject[] = "'$paramName':" . self::phpValueToJs($paramValue);
5555
}
5656

57-
return sprintf('{%1$s}', implode($jsObject, ','));
57+
return sprintf('{%1$s}', implode(',', $jsObject));
5858
}
5959
// For a sequential array
6060
elseif (is_array($value)) {
@@ -63,7 +63,7 @@ public static function phpValueToJs($value)
6363
$jsArray[] = self::phpValueToJs($item);
6464
}
6565

66-
return sprintf('[%1$s]', implode($jsArray, ','));
66+
return sprintf('[%1$s]', implode(',', $jsArray));
6767
}
6868
// For string
6969
elseif (is_string($value)) {
@@ -101,4 +101,4 @@ public function toArray()
101101

102102
return $result;
103103
}
104-
}
104+
}

0 commit comments

Comments
 (0)