@@ -105,7 +105,15 @@ public function handleEditor(): string
105105 // the new one. Try to restore the backup query
106106 $ result = $ this ->dbi ->tryQuery ($ createItem );
107107 if (! $ result ) {
108- $ GLOBALS ['errors ' ] = $ this ->checkResult ($ createItem , $ GLOBALS ['errors ' ]);
108+ // OMG, this is really bad! We dropped the query,
109+ // failed to create a new one
110+ // and now even the backup query does not execute!
111+ // This should not happen, but we better handle
112+ // this just in case.
113+ $ GLOBALS ['errors ' ][] = __ ('Sorry, we failed to restore the dropped event. ' ) . '<br> '
114+ . __ ('The backed up query was: ' )
115+ . '" ' . htmlspecialchars ($ createItem ) . '"<br> '
116+ . __ ('MySQL said: ' ) . $ this ->dbi ->getError ();
109117 }
110118 } else {
111119 $ GLOBALS ['message ' ] = Message::success (
@@ -335,27 +343,6 @@ public function getEventSchedulerStatus(): bool
335343 return strtoupper ($ state ) === 'ON ' || $ state === '1 ' ;
336344 }
337345
338- /**
339- * @param string|null $createStatement Query
340- * @param mixed[] $errors Errors
341- *
342- * @return mixed[]
343- */
344- private function checkResult (string |null $ createStatement , array $ errors ): array
345- {
346- // OMG, this is really bad! We dropped the query,
347- // failed to create a new one
348- // and now even the backup query does not execute!
349- // This should not happen, but we better handle
350- // this just in case.
351- $ errors [] = __ ('Sorry, we failed to restore the dropped event. ' ) . '<br> '
352- . __ ('The backed up query was: ' )
353- . '" ' . htmlspecialchars ((string ) $ createStatement ) . '"<br> '
354- . __ ('MySQL said: ' ) . $ this ->dbi ->getError ();
355-
356- return $ errors ;
357- }
358-
359346 /**
360347 * Returns details about the EVENTs for a specific database.
361348 *
0 commit comments