Skip to content
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

Repair #10

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions db_dispose.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
public function dbCookie(): string|false
{
if (!isset($_COOKIE['UID'])) {
check();

Check failure on line 256 in db_dispose.php

View workflow job for this annotation

GitHub Actions / MegaLinter

Function check not found.

Check failure on line 256 in db_dispose.php

View workflow job for this annotation

GitHub Actions / MegaLinter

Function check not found.
}
$cookie = htmlspecialchars($_COOKIE['UID'], ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
// 查询 cookie.
Expand Down Expand Up @@ -322,10 +322,10 @@
}
// 提交事务
$this->commit();
} catch (Exception $i) {
} catch (Exception $home_config_query) {
// 回滚事务
$this->rollBack();
throw $i;
throw new Exception('home_config query failure: ' . $home_config_query->getMessage());
}
return $data;
}
Expand Down Expand Up @@ -429,10 +429,10 @@
}
// 提交事务
$this->commit();
} catch (Exception $e) {
} catch (Exception $home_labels_query) {
// 回滚事务
$this->rollBack();
throw $e;
throw new Exception('home_labels query failure: ' . $home_labels_query->getMessage());
}
return $data;
}
Expand All @@ -448,7 +448,7 @@
public function dbIp(): void
{
$ip = (filter_var($_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP)) ?: 'invalid Ip'; // 获取当前ip地址
$response = new StatusCode();

Check failure on line 451 in db_dispose.php

View workflow job for this annotation

GitHub Actions / MegaLinter

Instantiated class StatusCode not found.

Check failure on line 451 in db_dispose.php

View workflow job for this annotation

GitHub Actions / MegaLinter

Instantiated class StatusCode not found.
$country = $response->getIp($ip); // 获取当前ip地址的详细信息

$timestamp = filter_var($_SERVER['REQUEST_TIME'], FILTER_VALIDATE_INT); // 时间戳
Expand Down
Loading