Permalink
Browse files

Events may be broken (bug #2898988)

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1264 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
1 parent 4510179 commit d545dadeab5c4b4c8c78f5571cf91ab36b99c949 jakubvrana committed Dec 11, 2009
Showing with 5 additions and 3 deletions.
  1. +5 −3 adminer/dump.inc.php
View
@@ -42,9 +42,11 @@
}
if ($_POST["events"]) {
$result = $connection->query("SHOW EVENTS");
- while ($row = $result->fetch_assoc()) {
- $out .= ($style != 'DROP+CREATE' ? "DROP EVENT IF EXISTS " . idf_escape($row["Name"]) . ";;\n" : "")
- . $connection->result($connection->query("SHOW CREATE EVENT " . idf_escape($row["Name"])), 3) . ";;\n\n";
+ if ($result) {
+ while ($row = $result->fetch_assoc()) {
+ $out .= ($style != 'DROP+CREATE' ? "DROP EVENT IF EXISTS " . idf_escape($row["Name"]) . ";;\n" : "")
+ . $connection->result($connection->query("SHOW CREATE EVENT " . idf_escape($row["Name"])), 3) . ";;\n\n";
+ }
}
}
if ($out) {

0 comments on commit d545dad

Please sign in to comment.