Change all the "new class" by "new Class"

This commit is contained in:
2021-05-07 13:10:37 +02:00
parent c8d275be31
commit c09fa961cd
39 changed files with 430 additions and 432 deletions

View File

@@ -214,14 +214,14 @@ class Logger
private function logfile ($message, $priority)
{
if ($this->logfile === FALSE)
throw new Exception ("Undefined file where logging");
throw new \Exception ("Undefined file where logging");
if (!file_exists ($this->logfile))
{
if (! is_dir (dirname ($this->logfile)))
throw new Exception ("You must create the ".dirname ($this->logfile).
throw new \Exception ("You must create the ".dirname ($this->logfile).
"directory");
if (! is_writable (dirname ($this->logfile)))
throw new Exception ("The directory ".dirname ($this->logfile)." must"
throw new \Exception ("The directory ".dirname ($this->logfile)." must"
." be writable to create log file");
}
elseif (!is_writable ($this->logfile))
@@ -232,7 +232,7 @@ class Logger
$user = getenv('USERNAME');
else
$user = "";
throw new Exception ("Logfile $this->logfile is not writable for user ".
throw new \Exception ("Logfile $this->logfile is not writable for user ".
$user);
}
@@ -313,7 +313,7 @@ class Logger
private function logsession ($message, $priority)
{
if (! isset ($_SESSION))
throw new Exception ("No session available to store the log", 500);
throw new \Exception ("No session available to store the log", 500);
ini_set ("date.timezone", $this->timezone);
$message = date ("Y/m/d H:i:s")." [".$this->priorities[$priority]."] ".
$message;