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