mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
Fix access to protected property Database_Abstract::$lastQuery
This commit is contained in:
parent
7a50198573
commit
5f94030c47
2 changed files with 5 additions and 1 deletions
|
|
@ -200,7 +200,7 @@ class Restore
|
|||
$db->ex("INSERT INTO {$db->getPrefix()}{$table} ($fieldsStr) VALUES ($subsStr)", $values);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
error_log("Failed query: {$db->lastQuery}");
|
||||
error_log("Failed query: {$db->getLastQuery()}");
|
||||
$this->lastErrorString = "Failed to add data to table '{$db->getPrefix()}$table'. Database error (see query in error log): ". $e->getMessage();
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,6 +100,10 @@ abstract class Database_Abstract
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getLastQuery(): string {
|
||||
return $this->lastQuery;
|
||||
}
|
||||
}
|
||||
|
||||
abstract class DatabaseResult_Abstract
|
||||
|
|
|
|||
Loading…
Reference in a new issue