You are not logged in.
Hello.
I use the Webservice 1.9.0 plugin, when i excecute de request glpi.addTicketDocument, give me an error
on the function addMessageAfterRedirect($msg, $check_once = false, $message_type = INFO, $reset = false), on the line array_push($array[$message_type], $msg);
if i change the line to "$array[$message_type] = $msg;" i haven't problems, but this is not the best way beacuase i change the core of GLPI.
Can you guys have any ideia how to change this?
Above the class in inc/session.class.php.
static function addMessageAfterRedirect($msg, $check_once = false, $message_type = INFO,
$reset = false) {
if (!empty($msg)) {
if (self::isCron()) {
// We are in cron mode
// Do not display message in user interface, but record error
if ($message_type == ERROR) {
Toolbox::logInFile('cron', $msg."\n");
}
} else {
$array = &$_SESSION['MESSAGE_AFTER_REDIRECT'];
if ($reset) {
$array = [];
}
if (!isset($array[$message_type])) {
$array[$message_type] = [];
}
if (!$check_once
|| !isset($array[$message_type])
|| in_array($msg, $array[$message_type]) === false) {
//array_push($array[$message_type], $msg);
$array[$message_type] = $msg;
}
}
}
}
Thanks for the good work.
Offline
Can you give me the complete error?
CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6 - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)
Offline