1
0
mirror of https://github.com/danog/telerpc.git synced 2024-11-26 12:04:47 +01:00
This commit is contained in:
Github Actions 2022-02-23 14:09:42 +01:00
parent dc9a9d80f6
commit 1d0c643948
3 changed files with 10 additions and 7 deletions

6
bk.sql

File diff suppressed because one or more lines are too long

2
data

@ -1 +1 @@
Subproject commit c9b196dd3a1d7a3c59a0837d8db501a641d31f82
Subproject commit e8c7109586f231790a738dcb114b1b7e929a44a3

View File

@ -81,6 +81,7 @@ final class Main
$q->execute();
$q->fetchAll(PDO::FETCH_FUNC, function ($error, $description) use (&$hr) {
$error = self::sanitize($error);
$description = \str_replace(' X ', ' %d ', $description);
$hr[$error] = $description;
});
@ -164,7 +165,7 @@ final class Main
$q->execute();
$r = $q->fetchAll(PDO::FETCH_COLUMN | PDO::FETCH_GROUP);
foreach ($r as $error => $methods) {
if (\strpos($error, 'INPUT_METHOD_INVALID') !== false || \strpos($error, 'INPUT_CONSTRUCTOR_INVALID') !== false || \strpos($error, 'Received bad_msg_notification') === 0) {
if (\strpos($error, 'INPUT_METHOD_INVALID') !== false || \strpos($error, 'INPUT_CONSTRUCTOR_INVALID') !== false || \strpos($error, 'Received bad_msg_notification') === 0 || $error === 'CONNECTION_NOT_INITED' || $error === 'LOCATION_NOT_AVAILABLE') {
$q = $this->pdo->prepare('DELETE FROM errors WHERE error=?');
$q->execute([$error]);
$q = $this->pdo->prepare('DELETE FROM error_descriptions WHERE error=?');
@ -239,10 +240,12 @@ final class Main
|| \str_contains($_REQUEST['error'], 'EMAIL_UNCONFIRMED_')
|| \str_contains($_REQUEST['error'], '_MIGRATE_')
|| \preg_match('/FILE_PART_\d*_MISSING/', $_REQUEST['error'])
|| $_REQUEST['code'] == 500
|| $_REQUEST['error'] === $_REQUEST['method']
)
) {
$error = $_REQUEST['error'];
$method = self::sanitize($_REQUEST['error']);
$error = self::sanitize($_REQUEST['error']);
$method = $_REQUEST['method'];
$code = $_REQUEST['code'];
try {