{"action":"closed","issue":{"url":"https://api.github.com/repos/glpi-project/glpi/issues/4414","repository_url":"https://api.github.com/repos/glpi-project/glpi","labels_url":"https://api.github.com/repos/glpi-project/glpi/issues/4414/labels{/name}","comments_url":"https://api.github.com/repos/glpi-project/glpi/issues/4414/comments","events_url":"https://api.github.com/repos/glpi-project/glpi/issues/4414/events","html_url":"https://github.com/glpi-project/glpi/issues/4414","id":346571692,"node_id":"MDU6SXNzdWUzNDY1NzE2OTI=","number":4414,"title":"[9.3.1] : cron error when user replies to a \"resolved\" ticket","user":{"login":"Rico29","id":12935571,"node_id":"MDQ6VXNlcjEyOTM1NTcx","avatar_url":"https://avatars2.githubusercontent.com/u/12935571?v=4","gravatar_id":"","url":"https://api.github.com/users/Rico29","html_url":"https://github.com/Rico29","followers_url":"https://api.github.com/users/Rico29/followers","following_url":"https://api.github.com/users/Rico29/following{/other_user}","gists_url":"https://api.github.com/users/Rico29/gists{/gist_id}","starred_url":"https://api.github.com/users/Rico29/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rico29/subscriptions","organizations_url":"https://api.github.com/users/Rico29/orgs","repos_url":"https://api.github.com/users/Rico29/repos","events_url":"https://api.github.com/users/Rico29/events{/privacy}","received_events_url":"https://api.github.com/users/Rico29/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-08-01T12:07:42Z","updated_at":"2018-08-02T12:25:40Z","closed_at":"2018-08-02T12:25:40Z","author_association":"NONE","body":"* Steps to reproduce (which actions have you made) :\r\n\r\n1 - open a ticket\r\n2 - write a mesage in the ticket follow-ups\r\n3 - mark the ticket as resolved\r\n4 - reply to the mail sent to the users, saying ticket has been resolved\r\n\r\n\r\n\r\n* Expected result :\r\nContent of mail appenet to ticket follow-ups\r\n\r\n* Actual result :\r\nContent of mail appenet to ticket follow-ups\r\nerrors reported by cron task : \r\n\r\n> Toolbox::userErrorHandlerNormal() in /usr/share/glpi_9.3/inc/toolbox.class.php line 657\r\n>   *** PHP Warning(2): Illegal offset type in isset or empty\r\n>   Backtrace :\r\n>   inc/ticket.class.php:126                           \r\n>   inc/ticketfollowup.class.php:391                   Ticket::getTimelinePosition()\r\n>   inc/commondbtm.class.php:937                       TicketFollowup->prepareInputForAdd()\r\n>   inc/mailcollector.class.php:668                    CommonDBTM->add()\r\n>   inc/mailcollector.class.php:1744                   MailCollector->collect()\r\n>   inc/crontask.class.php:836                         MailCollector::cronMailgate()\r\n>   front/cron.php:83                                  CronTask::launch()\r\n>  Toolbox::userErrorHandlerNormal() in /usr/share/glpi_9.3/inc/toolbox.class.php line 657\r\n>   *** PHP Warning(2): preg_match() expects parameter 2 to be string, array given\r\n>   Backtrace :\r\n>   :                                                  \r\n>   inc/dbmysql.class.php:877                          preg_match()\r\n>   inc/dbmysql.class.php:900                          DBmysql::quoteValue()\r\n>   inc/dbmysql.class.php:923                          DBmysql->buildInsert()\r\n>   inc/commondbtm.class.php:537                       DBmysql->insert()\r\n>   inc/commondbtm.class.php:974                       CommonDBTM->addToDB()\r\n>   inc/mailcollector.class.php:668                    CommonDBTM->add()\r\n>   inc/mailcollector.class.php:1744                   MailCollector->collect()\r\n>   inc/crontask.class.php:836                         MailCollector::cronMailgate()\r\n>   front/cron.php:83                                  CronTask::launch()\r\n>  Toolbox::userErrorHandlerNormal() in /usr/share/glpi_9.3/inc/toolbox.class.php line 657\r\n>   *** PHP Notice(8): Array to string conversion\r\n>   Backtrace :\r\n>   inc/dbmysql.class.php:879                          \r\n>   inc/dbmysql.class.php:900                          DBmysql::quoteValue()\r\n>   inc/dbmysql.class.php:923                          DBmysql->buildInsert()\r\n>   inc/commondbtm.class.php:537                       DBmysql->insert()\r\n>   inc/commondbtm.class.php:974                       CommonDBTM->addToDB()\r\n>   inc/mailcollector.class.php:668                    CommonDBTM->add()\r\n>   inc/mailcollector.class.php:1744                   MailCollector->collect()\r\n>   inc/crontask.class.php:836                         MailCollector::cronMailgate()\r\n>   front/cron.php:83                                  CronTask::launch()\r\n>  Toolbox::userErrorHandlerNormal() in /usr/share/glpi_9.3/inc/toolbox.class.php line 657\r\n>   *** PHP Warning(2): preg_match() expects parameter 2 to be string, array given\r\n>   Backtrace :\r\n>   :                                                  \r\n>   inc/dbmysql.class.php:877                          preg_match()\r\n>   inc/dbmysql.class.php:981                          DBmysql::quoteValue()\r\n>   inc/dbmysql.class.php:1003                         DBmysql->buildUpdate()\r\n>   inc/commonitilobject.class.php:4453                DBmysql->update()\r\n>   inc/ticket.class.php:2543                          CommonITILObject->updateDateMod()\r\n>   inc/ticketfollowup.class.php:407                   Ticket->updateDateMod()\r\n>   inc/commondbtm.class.php:975                       TicketFollowup->post_addItem()\r\n>   inc/mailcollector.class.php:668                    CommonDBTM->add()\r\n>   inc/mailcollector.class.php:1744                   MailCollector->collect()\r\n>   inc/crontask.class.php:836                         MailCollector::cronMailgate()\r\n>   front/cron.php:83                                  CronTask::launch()\r\n>  Toolbox::userErrorHandlerNormal() in /usr/share/glpi_9.3/inc/toolbox.class.php line 657\r\n>   *** PHP Notice(8): Array to string conversion\r\n>   Backtrace :\r\n>   inc/dbmysql.class.php:879                          \r\n>   inc/dbmysql.class.php:981                          DBmysql::quoteValue()\r\n>   inc/dbmysql.class.php:1003                         DBmysql->buildUpdate()\r\n>   inc/commonitilobject.class.php:4453                DBmysql->update()\r\n>   inc/ticket.class.php:2543                          CommonITILObject->updateDateMod()\r\n>   inc/ticketfollowup.class.php:407                   Ticket->updateDateMod()\r\n>   inc/commondbtm.class.php:975                       TicketFollowup->post_addItem()\r\n>   inc/mailcollector.class.php:668                    CommonDBTM->add()\r\n>   inc/mailcollector.class.php:1744                   MailCollector->collect()\r\n>   inc/crontask.class.php:836                         MailCollector::cronMailgate()\r\n>   front/cron.php:83                                  CronTask::launch()\r\n>  DBmysql::query() in /usr/share/glpi_9.3/inc/dbmysql.class.php line 177\r\n>   *** MySQL query error:\r\n>   SQL: UPDATE `glpi_itilsolutions`\r\n>             SET `status`=4, `users_id_approval`=,\r\n>             `date_approval`='2018-08-01 11:43:01'\r\n>                WHERE `itemtype`='Ticket'\r\n>                AND `items_id`=4658\r\n>                ORDER BY date_creation DESC, id DESC LIMIT 1\r\n>   Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '\r\n>             `date_approval`='2018-08-01 11:43:01'\r\n>                WHERE `itemtyp' at line 2\r\n>   Backtrace :\r\n>   inc/commonitilobject.class.php:1223                \r\n>   inc/ticket.class.php:1563                          CommonITILObject->pre_updateInDB()\r\n>   inc/commondbtm.class.php:1272                      Ticket->pre_updateInDB()\r\n>   inc/ticketfollowup.class.php:446                   CommonDBTM->update()\r\n>   inc/commondbtm.class.php:975                       TicketFollowup->post_addItem()\r\n>   inc/mailcollector.class.php:668                    CommonDBTM->add()\r\n>   inc/mailcollector.class.php:1744                   MailCollector->collect()\r\n>   inc/crontask.class.php:836                         MailCollector::cronMailgate()\r\n>   front/cron.php:83                                  CronTask::launch()"}}
{"actor":{"display_login":"trasher"}}