From d14b81bc0242cfb49229571f38eb26fa7de43b2b Mon Sep 17 00:00:00 2001
From: Olaf Bohlen <olbohlen@eenfach.de>
Date: Fri, 16 Jun 2023 13:01:28 +0200
Subject: [PATCH] init vars to empty value

---
 index.php |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/index.php b/index.php
index cb5db10..f1b6ebd 100644
--- a/index.php
+++ b/index.php
@@ -24,7 +24,12 @@
       echo "no other file found!";
     }
     echo '</p>';
- 
+
+    $host = "";
+    $user = "";
+    $pass = "";
+    $db = "";
+
     $host = $_ENV["DBHOST"]; 
     $user = $_ENV["DBUSER"]; 
     $pass = $_ENV["DBPASS"]; 
@@ -43,14 +48,6 @@
     }
     echo "</p>";
     pg_close($con);
-
-    set_error_handler(function(int $errno, string $errstr) {
-      if ((strpos($errstr, 'Undefined array key') === false) && (strpos($errstr, 'Undefined variable') === false)) {
-        return false;
-      } else {
-        return true;
-      }
-    }, E_WARNING);
 ?>
  </body>
 </html>

--
Gitblit v1.9.3