Don't print error message with no error (bug #3118538)
This commit is contained in:
parent
50bb1f8d84
commit
8c10fc05f4
|
@ -78,14 +78,7 @@ if (!$error && $_POST) {
|
||||||
}
|
}
|
||||||
$start = explode(" ", microtime()); // microtime(true) is available since PHP 5
|
$start = explode(" ", microtime()); // microtime(true) is available since PHP 5
|
||||||
//! don't allow changing of character_set_results, convert encoding of displayed query
|
//! don't allow changing of character_set_results, convert encoding of displayed query
|
||||||
if (!$connection->multi_query($q)) {
|
if ($connection->multi_query($q)) {
|
||||||
echo ($_POST["only_errors"] ? $print : "");
|
|
||||||
echo "<p class='error'>" . lang('Error in query') . ": " . error() . "\n";
|
|
||||||
$errors[] = " <a href='#sql-$commands'>$commands</a>";
|
|
||||||
if ($_POST["error_stops"]) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (is_object($connection2) && preg_match("~^$space*(USE)\\b~isU", $q)) {
|
if (is_object($connection2) && preg_match("~^$space*(USE)\\b~isU", $q)) {
|
||||||
$connection2->query($q);
|
$connection2->query($q);
|
||||||
}
|
}
|
||||||
|
@ -119,6 +112,13 @@ if (!$error && $_POST) {
|
||||||
}
|
}
|
||||||
$start = $end;
|
$start = $end;
|
||||||
} while ($connection->next_result());
|
} while ($connection->next_result());
|
||||||
|
} elseif ($connection->error) {
|
||||||
|
echo ($_POST["only_errors"] ? $print : "");
|
||||||
|
echo "<p class='error'>" . lang('Error in query') . ": " . error() . "\n";
|
||||||
|
$errors[] = " <a href='#sql-$commands'>$commands</a>";
|
||||||
|
if ($_POST["error_stops"]) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$query = substr($query, $offset);
|
$query = substr($query, $offset);
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
|
|
Loading…
Reference in a new issue