InfotelGLPI / printercounters

Plugin Printercounters for GLPI
http://blogglpi.infotel.com
GNU General Public License v2.0
14 stars 9 forks source link

Error SQL for tickets created with cron #34

Closed amma35 closed 6 years ago

amma35 commented 6 years ago

SQL error for tickets created with the automatic action when an apostrophe character is present.

  *** MySQL query error:
  SQL: INSERT
                   INTO `glpi_tickets` (`entities_id`,`status`,`itilcategories_id`,`name`,`content`,`urgency`,`impact`,`priority`,`users_id_recipient`,`date`,`requesttypes_id`,`global_validation`,`locations_id`,`type`,`date_creation`,`date_mod`) VALUES ('1','2','30','Imprimante - Aucun relevé','Erreur de relevé des compteurs d'impression', ...)
  Error: Erreur de syntaxe près de 'impression' à la ligne 2
  Backtrace :
  inc\commondbtm.class.php:504                       
  inc\commondbtm.class.php:928                       CommonDBTM->addToDB()
  ...s\printercounters\inc\item_ticket.class.php:648 CommonDBTM->add()
  ...s\printercounters\inc\item_ticket.class.php:615 PluginPrintercountersItem_Ticket->createTicket()
  ...s\printercounters\inc\item_ticket.class.php:413 PluginPrintercountersItem_Ticket->checkNoRecordForDelay()
  inc\crontask.class.php:832                         PluginPrintercountersItem_Ticket::cronPrintercountersCreateTicket()
  front\cron.php:65                                  CronTask::launch()