The branch, master has been updated
via 5ea6683d0e80ef4022c6509dcf6b1ad206b0c859 (commit)
from 54a37aee2d93f72513a6ac9d07b8afd14d66d6dd (commit)
- Log -----------------------------------------------------------------
commit 5ea6683d0e80ef4022c6509dcf6b1ad206b0c859
Author: Marc Delisle <marc(a)infomarc.info>
Date: Tue Jan 11 07:53:30 2011 -0500
Avoid notice for undefined global
-----------------------------------------------------------------------
Summary of changes:
db_operations.php | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/db_operations.php b/db_operations.php
index 36b479c..94120d9 100644
--- a/db_operations.php
+++ b/db_operations.php
@@ -196,7 +196,9 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy)))
{
if (! $_error) {
// temporarily force to add DROP IF EXIST to CREATE VIEW query,
// to remove stand-in VIEW that was created earlier
- $temp_drop_if_exists = $GLOBALS['drop_if_exists'];
+ if (isset($GLOBALS['drop_if_exists'])) {
+ $temp_drop_if_exists = $GLOBALS['drop_if_exists'];
+ }
$GLOBALS['drop_if_exists'] = 'true';
foreach ($views as $view) {
@@ -205,8 +207,12 @@ if (strlen($db) && (! empty($db_rename) || !
empty($db_copy))) {
break;
}
}
- // restore previous value
- $GLOBALS['drop_if_exists'] = $temp_drop_if_exists;
+ unset($GLOBALS['drop_if_exists']);
+ if (isset($temp_drop_if_exists)) {
+ // restore previous value
+ $GLOBALS['drop_if_exists'] = $temp_drop_if_exists;
+ unset($temp_drop_if_exists);
+ }
}
unset($view, $views);
hooks/post-receive
--
phpMyAdmin