I've big big trouble, this php code doesn't work anymore since I upgraded to 3.5 (and php 7.3 to php 8)
It should return a pattern (such as "2401C125") but it always return "0"
I think it's a difference between php 7.3 and 8, but I can't see what's wrong.
Please, tell me something good, I'm in big trouble now...
Code: Select all
$datecrea = gmdate("Ym", [date_added]);;
$minute = date("his");
$debut = substr($datecrea,-4,4);
$initiale = chr(65+[created_by]);
$compt = [id] % 999;
$compteur=str_pad($compt, 3, "0", STR_PAD_LEFT);
$code_import = [302];
$code = [293];
$id_utilisateur = $app_user['id']; # Identifiant de 'lutilisateur courant
$initiale = chr(64+ $id_utilisateur); # l'initiale associèe à l'utilisateur courant
if ($code_import<>'')
$output_value = $code_import;
else
if (empty($code))
$output_value = $debut. 'N' .$compteur;