From 5b8668f181f18d64c1e283c4faa05962847e61a3 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Mon, 15 May 2006 17:23:15 +0000 Subject: [PATCH] bug #1475949, removing the default value --- ChangeLog | 3 +++ libraries/Table.class.php | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7013b6362..3f1c0e46a 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - ChangeLog $Id$ $Source$ +2006-05-15 Marc Delisle + * libraries/Table.class.php: bug #1475949, removing the default value + 2006-05-15 Michal Čihař * scripts/setup.php: Compatibility with security tokens (bug #1488453). * scripts/setup.php: Fix detection of writable config (bug #1488447). diff --git a/libraries/Table.class.php b/libraries/Table.class.php index 6ef013c40..043dac73c 100644 --- a/libraries/Table.class.php +++ b/libraries/Table.class.php @@ -307,7 +307,9 @@ class PMA_Table { if (strtoupper($default) == 'NULL') { $query .= ' DEFAULT NULL'; } else { - $query .= ' DEFAULT \'' . PMA_sqlAddslashes($default) . '\''; + if (strlen($default)) { + $query .= ' DEFAULT \'' . PMA_sqlAddslashes($default) . '\''; + } } }