From fa15511170e6fe15aafcaa7f1a0af8758f154b6f Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 2 Feb 2009 19:14:35 -0500 Subject: [PATCH] Disable MySQL strict mode so that errors do not occur if the server has it set. Fixes bug #67. * includes/init.php * install/global.php Cherry pick 2c8c00e --- docs/changes.txt | 1 + includes/init.php | 3 +++ install/global.php | 3 +++ 3 files changed, 7 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index 20dc002..1e03dcd 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -10,6 +10,7 @@ - Change: Required custom select fields will no longer show the empty option (these fields could not be saved as empty, though, because they wouldn't validate -- this is purely an interface change) - Change: The description (first comment) is now stored in a separate variable from the rest of the comments, allowing for one to move its placement in templates/showreport.tpl - Fixed: #148: The permission mask fields were smallint, when they should be int to hold larger int values that permission masks have +- Fixed: #67: MySQL's strict mode would cause installation to fail 1.2.2 =============================== diff --git a/includes/init.php b/includes/init.php index 0753791..bde3c5e 100755 --- a/includes/init.php +++ b/includes/init.php @@ -59,6 +59,9 @@ if ($utf8) $db->query("SET NAMES utf8"); } +// don't use sql strict mode +$db->query("SET sql_mode = ''"); + define('DEVDEBUG', $debug); define('TABLE_PREFIX', $tableprefix); define('COOKIE_PREFIX', $cookieprefix); diff --git a/install/global.php b/install/global.php index 3db62d4..1c9b969 100644 --- a/install/global.php +++ b/install/global.php @@ -56,6 +56,9 @@ if ($utf8) $db->query("SET NAMES utf8"); } +// don't use sql strict mode +$db->query("SET sql_mode = ''"); + // needed for API validation $bugsys->load('functions', 'funct'); -- 2.43.5