Bonjour,
Car ces fonctions retournent un nombre.
Édit : tu peux essayer en faisant ta propre fonction
public static function my_lastBetween($_cmd_id, $_startDate, $_endDate) {
$cmd = cmd::byId(trim(str_replace('#', '', $_cmd_id)));
if (!is_object($cmd) || $cmd->getIsHistorized() == 0) {
return '';
}
$_startTime = date('Y-m-d H:i:s', strtotime(self::setTags($_startDate)));
$_endTime = date('Y-m-d H:i:s', strtotime(self::setTags($_endDate)));
$historyStatistique = $cmd->getStatistique($_startTime, $_endTime);
if (!isset($historyStatistique['last']) || $historyStatistique['last'] === '') {
return '';
}
return $historyStatistique['last'];
}
que tu places dans le fichier user.function.class.php. Et tu appelles my_lastBetween à la place de lastBetween.