Skip to content

Commit

Permalink
Update backup.php
Browse files Browse the repository at this point in the history
  • Loading branch information
condor2 authored Feb 26, 2024
1 parent cdb82c3 commit 6d9640f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions upload/admin/controller/tool/backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ public function import(): void {
$sql .= $line;
}

if ($start && substr($line, -2) == ";\n") {
if (isset($sql) && $sql && $start && substr($line, -2) == ";\n") {
$this->db->query(substr($sql, 0, strlen($sql) -2));

$start = false;
} else if ($start && substr($line, -3) == ";\r\n") {
} else if (isset($sql) && $sql && $start && substr($line, -3) == ";\r\n") {
$this->db->query(substr($sql, 0, strlen($sql) -3));

$start = false;
Expand Down

0 comments on commit 6d9640f

Please sign in to comment.