From c53c1a27a45bd82633ba13191991885d3763dc8e Mon Sep 17 00:00:00 2001 From: billz Date: Thu, 20 Mar 2025 02:02:35 -0700 Subject: [PATCH] Fix: Specify global Exception class by adding backslash --- src/RaspAP/DotEnv/DotEnv.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/RaspAP/DotEnv/DotEnv.php b/src/RaspAP/DotEnv/DotEnv.php index 1e8397a1..0b250f92 100644 --- a/src/RaspAP/DotEnv/DotEnv.php +++ b/src/RaspAP/DotEnv/DotEnv.php @@ -37,7 +37,7 @@ class DotEnv } } } else { - throw new Exception(".env file '{$this->envFile}' not found."); + throw new \Exception(".env file '{$this->envFile}' not found."); } } @@ -75,7 +75,7 @@ class DotEnv file_put_contents("/tmp/.env", $content); system('sudo mv /tmp/.env '.$this->envFile, $result); if ($result !== 0) { - throw new Exception("Unable to move .env file: ". $this->envFile); + throw new \Exception("Unable to move .env file: ". $this->envFile); } } @@ -83,7 +83,7 @@ class DotEnv { exec('sudo touch '. escapeshellarg($this->envFile), $output, $result); if ($result !== 0) { - throw new Exception("Unable to create .env file: ". $this->envFile); + throw new \Exception("Unable to create .env file: ". $this->envFile); } } }