-
-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent misleading warning being printed to the lighttpd error log when importing from teleporter backup #2118
Conversation
As I've been asked: |
c8200e2
to
0d066ce
Compare
FP'd new code, tested by using adding some error logging into it as below: // Flush table if requested, only flush each table once
if($flush && !in_array($table, $flushed_tables))
{
$tableExists = $db->querySingle("SELECT name FROM sqlite_master WHERE type='table' AND name='".$table."';");
if ($tableExists)
{
error_log("doing ".$table);
$db->exec("DELETE FROM \"".$table."\"");
array_push($flushed_tables, $table);
}
else
{
error_log("not doing ".$table);
}
} Which outputs:
|
0d066ce
to
e9e85e4
Compare
…en attempting to flush tables that don't actually exist Signed-off-by: Adam Warner <me@adamwarner.co.uk>
e9e85e4
to
edfcf45
Compare
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/pi-hole-ftl-v5-14-web-v5-11-and-core-v5-9-released/53529/1 |
By submitting this pull request, I confirm the following:
git rebase
)What does this PR aim to accomplish?:
Fixes #2117 by adding a check for table name before attempting to flush it