Browse Source

fix php8.2 warnings

Frédéric FRANCE 2 years ago
parent
commit
47d241bf50
1 changed files with 6 additions and 1 deletions
  1. 6 1
      htdocs/debugbar/class/DataCollector/DolLogsCollector.php

+ 6 - 1
htdocs/debugbar/class/DataCollector/DolLogsCollector.php

@@ -20,6 +20,11 @@ class DolLogsCollector extends MessagesCollector
 	 */
 	protected $maxnboflines;
 
+	/**
+	 * @var int number of lines
+	 */
+	protected $nboflines;
+
 	/**
 	 * Constructor
 	 *
@@ -33,7 +38,7 @@ class DolLogsCollector extends MessagesCollector
 		parent::__construct($name);
 
 		$this->nboflines = 0;
-		$this->maxnboflines = empty($conf->global->DEBUGBAR_LOGS_LINES_NUMBER) ? 250 : $conf->global->DEBUGBAR_LOGS_LINES_NUMBER; // High number slows seriously output
+		$this->maxnboflines = getDolGlobalInt('DEBUGBAR_LOGS_LINES_NUMBER', 250); // High number slows seriously output
 
 		$this->path = $path ?: $this->getLogsFile();
 	}