Change all the "new class" by "new Class"
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user