mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2025-12-30 17:07:49 -05:00
* Fix log CRLF injection * empty -> space Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
34 lines
767 B
PHP
34 lines
767 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
class FreshRSS_Log extends Minz_Model {
|
|
|
|
private string $date;
|
|
/** @property 'error'|'warning'|'notice'|'debug'|'info' $level */
|
|
private string $level;
|
|
private string $information;
|
|
|
|
public function date(): string {
|
|
return $this->date;
|
|
}
|
|
public function level(): string {
|
|
return $this->level;
|
|
}
|
|
public function info(): string {
|
|
return $this->information;
|
|
}
|
|
public function _date(string $date): void {
|
|
$this->date = $date;
|
|
}
|
|
public function _level(string $level): void {
|
|
if (!in_array($level, ['error', 'warning', 'notice', 'debug', 'info'], true)) {
|
|
$this->level = 'info';
|
|
return;
|
|
}
|
|
$this->level = $level;
|
|
}
|
|
public function _info(string $information): void {
|
|
$this->information = $information;
|
|
}
|
|
}
|