Merge pull request #19101 from kamil-tekiela/Fix-to-stop-processing-queries-on-error
Fix to stop processing queries on error Fixes #19091 Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
commit
ba5533c2c2
@ -252,10 +252,15 @@ class Import
|
||||
unset($sqlData['valid_full']);
|
||||
for ($i = 0; $i < $count; $i++) {
|
||||
$this->executeQuery($queries[$i], $fulls[$i], $sqlData);
|
||||
if ($GLOBALS['error']) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->executeQuery($import_run_buffer['sql'], $import_run_buffer['full'], $sqlData);
|
||||
if (! $GLOBALS['error']) {
|
||||
$this->executeQuery($import_run_buffer['sql'], $import_run_buffer['full'], $sqlData);
|
||||
}
|
||||
}
|
||||
} elseif (! empty($import_run_buffer['full'])) {
|
||||
if ($go_sql) {
|
||||
|
||||
@ -161,6 +161,10 @@ class ImportSql extends ImportPlugin
|
||||
$this->import->runQuery($statement, $statement, $sql_data);
|
||||
}
|
||||
|
||||
if ($GLOBALS['error']) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Finishing.
|
||||
$this->import->runQuery('', '', $sql_data);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user