Skip to content

Commit 3a60b5b

Browse files
authored
Add files via upload
fixed for php v8.2
1 parent 8fde1f2 commit 3a60b5b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ELI/classes/class.database.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,8 @@ function query($sql,$config='')
403403
{
404404
try {
405405
$conn = self::connect_db($config);
406+
if(!empty($sql)){
407+
406408
$stmt = $conn->prepare($sql);
407409
$stmt->execute();
408410
// set the resulting array to associative
@@ -417,7 +419,8 @@ function query($sql,$config='')
417419
} else {
418420
echo "0 results";
419421
}
420-
self::disconnect_db($config);
422+
self::disconnect_db($config);
423+
}
421424
}
422425
catch (PDOException $err) {
423426
self::formatError($err);

0 commit comments

Comments
 (0)