Trim $GLOBALS['my_die']

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
Kamil Tekiela 2023-12-08 19:12:18 +01:00
parent fc82232b15
commit 4f2b92a2af
3 changed files with 1 additions and 7 deletions

View File

@ -2128,7 +2128,6 @@
<code><![CDATA[$GLOBALS['max_sql_len']]]></code>
<code><![CDATA[$GLOBALS['message_to_show']]]></code>
<code><![CDATA[$GLOBALS['msg']]]></code>
<code><![CDATA[$GLOBALS['my_die']]]></code>
<code><![CDATA[$GLOBALS['noplugin']]]></code>
<code><![CDATA[$GLOBALS['read_multiply']]]></code>
<code><![CDATA[$GLOBALS['reset_charset']]]></code>

View File

@ -94,7 +94,6 @@ final class ImportController extends AbstractController
$GLOBALS['import_file_name'] ??= null;
$GLOBALS['import_notice'] ??= null;
$GLOBALS['read_multiply'] ??= null;
$GLOBALS['my_die'] ??= null;
$GLOBALS['active_page'] ??= null;
$GLOBALS['charset_of_file'] = $request->getParsedBodyParam('charset_of_file');

View File

@ -127,7 +127,6 @@ class Import
*/
public function executeQuery(string $sql, array &$sqlData): void
{
$GLOBALS['my_die'] ??= null;
$GLOBALS['error'] ??= null;
$GLOBALS['msg'] ??= null;
$GLOBALS['sql_query_disabled'] ??= null;
@ -140,10 +139,7 @@ class Import
$GLOBALS['msg'] = '# ';
if ($GLOBALS['result'] === false) { // execution failed
if (! isset($GLOBALS['my_die'])) {
$GLOBALS['my_die'] = [];
}
$GLOBALS['my_die'] ??= [];
$GLOBALS['my_die'][] = ['sql' => $sql, 'error' => $dbi->getError()];
$GLOBALS['msg'] .= __('Error');