Olaf Bohlen
2023-06-16 4470311f8174fc9bd15d1064566481ca1b9f4faa
hide warnings in php
1 files modified
10 ■■■■■ changed files
index.php 10 ●●●●● patch | view | raw | blame | history
index.php
@@ -42,7 +42,15 @@
      echo "$row[0]\n";
    }
    echo "</p>";
    pg_close($con);
    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>