Skip to content

Commit 73c7408

Browse files
committed
fix: add error handling
1 parent fb7a35b commit 73c7408

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

index.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@
2121

2222
$sql = "SELECT * FROM phpspeed_config";
2323
$result = $db->sql_query($sql);
24-
$ver = mysql_fetch_assoc($result);
2524

26-
if ($ver == "")
25+
if ($result === false)
2726
{
2827
header("Location:install/install.php");
2928
die;
3029
}
3130

31+
$ver = mysql_fetch_assoc($result);
32+
3233
session_start();
3334

3435
if (isset($_GET['action']) and $_GET['action'] == 'logout') {

0 commit comments

Comments
 (0)