Fix php8
This commit is contained in:
parent
e81c18b648
commit
c097e140cc
@ -141,7 +141,7 @@ class Events // extends CommonObject
|
||||
|
||||
// Clean parameters
|
||||
$this->description = trim($this->description);
|
||||
if (empty($this->user_agent) && !empty($_SERVER['HTTP_USER_AGENT'])) $this->user_agent = $_SERVER['HTTP_USER_AGENT'];
|
||||
if (empty($this->user_agent)) $this->user_agent = (empty($_SERVER['HTTP_USER_AGENT'])?'':$_SERVER['HTTP_USER_AGENT']);
|
||||
|
||||
// Check parameters
|
||||
if (empty($this->description)) { $this->error = 'ErrorBadValueForParameterCreateEventDesc'; return -1; }
|
||||
|
||||
@ -174,7 +174,7 @@ class InterfaceLogevents extends DolibarrTriggers
|
||||
$event->dateevent = $date;
|
||||
$event->label = $text;
|
||||
$event->description = $desc;
|
||||
$event->user_agent = $_SERVER["HTTP_USER_AGENT"];
|
||||
$event->user_agent = (empty($_SERVER["HTTP_USER_AGENT"])?'':$_SERVER["HTTP_USER_AGENT"]);
|
||||
|
||||
$result = $event->create($user);
|
||||
if ($result > 0) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user