mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-07-09 15:27:32 +00:00
Rename handle_database_error to handle_error
This commit is contained in:
parent
db4f0c3d80
commit
c9bc532c82
@ -60,7 +60,7 @@ class Check {
|
||||
}
|
||||
*/
|
||||
} catch (PDOException $ex) {
|
||||
Settings::handle_database_error($page->settings, $ex);
|
||||
Settings::handle_error($page->settings, $ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -205,5 +205,5 @@ try {
|
||||
|
||||
$page->print_footer();
|
||||
} catch (PDOException $ex) {
|
||||
Settings::handle_database_error($page->settings, $ex);
|
||||
Settings::handle_error($page->settings, $ex);
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ function __construct($page) {
|
||||
'kicks.php' => $row['c_kicks'],
|
||||
);
|
||||
} catch (PDOException $ex) {
|
||||
Settings::handle_database_error($page->settings, $ex);
|
||||
Settings::handle_error($page->settings, $ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ class Page {
|
||||
|
||||
return $st;
|
||||
} catch (PDOException $ex) {
|
||||
Settings::handle_database_error($this->settings, $ex);
|
||||
Settings::handle_error($this->settings, $ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ final class Settings {
|
||||
$this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$this->conn->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
|
||||
} catch (PDOException $e) {
|
||||
Settings::handle_database_error($this, $e);
|
||||
Settings::handle_error($this, $e);
|
||||
}
|
||||
if ($driver === 'pgsql') {
|
||||
$this->conn->query("SET NAMES 'UTF8';");
|
||||
@ -126,7 +126,7 @@ final class Settings {
|
||||
* @param $settings Settings
|
||||
* @param $e Exception
|
||||
*/
|
||||
static function handle_database_error($settings, $e) {
|
||||
static function handle_error($settings, $e) {
|
||||
$message = $e->getMessage();
|
||||
if ($settings->error_pages) {
|
||||
if (strstr($message, "Access denied for user")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user