departement-maine-et-loire / transferticketentity

GNU General Public License v3.0
10 stars 0 forks source link

Error in parsing id_ticket in class "PluginTransferticketentityTicket" #5

Closed tola42 closed 9 months ago

tola42 commented 9 months ago

Hi,

Some of URL, for my instances, are like this : "https://xxxxx/GLPI10.0.10" or "https://xxxx/Glpi10.0.9".

For retrieving the ticket ID, you use this code below, in class "PluginTransferticketentityTicket" :

$id_ticket` = $_SERVER["QUERY_STRING"];
$id_ticket = preg_replace('/[^0-9]/', '', $id_ticket);
$id_ticket = substr($id_ticket, 1);

But the code retrieve a wrong $id_ticket=100104 or 10094 for ticket n° 4

Maybe using $id_ticket = $_REQUEST('id'); can be the solution ?

YannickComba commented 9 months ago

Hello,

Thanks for your help. It was an old function that I used and that I never changed. The release 10.0.2 will solve your problem.

Regards.