Commit 5aa9938d authored by Sylvain's avatar Sylvain

Mise à jour de Dynamik

parent 60ef4fb5
...@@ -80,11 +80,6 @@ class Dynamik ...@@ -80,11 +80,6 @@ class Dynamik
// Traitement des % seuls pour éviter les conflits // Traitement des % seuls pour éviter les conflits
$format = preg_replace('/(%)[^0-9sd.\']/i', '%%"', $format); $format = preg_replace('/(%)[^0-9sd.\']/i', '%%"', $format);
// Convertion en tableau si besoin
// if (!is_array($args)) {
// $args = [$args];
// }
// Préparation des arguments pour le template // Préparation des arguments pour le template
$arguments = $this->getValue($args); $arguments = $this->getValue($args);
...@@ -117,18 +112,15 @@ class Dynamik ...@@ -117,18 +112,15 @@ class Dynamik
$function = preg_replace('/(\(.*)/', '', $function); $function = preg_replace('/(\(.*)/', '', $function);
// Préparation des arguments pour la fonction // Préparation des arguments pour la fonction
$arguments = (array) $this->getValue($args); $arguments = $this->getValue($args);
//dd($function, $arguments);
if (!is_array($arguments)) { if (!is_array($arguments)) {
$arguments = [$arguments]; $arguments = [$arguments];
} }
// if ($function == 'str_limit') {
// dd('ok');
// }
$value = call_user_func_array($function, $arguments); $value = call_user_func_array($function, $arguments);
return $this->getValue($value); return $value;
} }
/** /**
......
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