From 2c8c00e25f26996aa293da8689c34ec8631a160d Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 2 Feb 2009 19:12:12 -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 --- 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 b47ed80..cb97448 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -6,6 +6,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 757c684..d51ee77 100755 --- a/includes/init.php +++ b/includes/init.php @@ -54,6 +54,9 @@ if ($utf8) $db->query("SET NAMES utf8"); } +// don't use sql strict mode +$db->query("SET sql_mode = ''"); + $bugsys->load('functions', 'funct', true); $bugsys->load('xml', 'xml', true); diff --git a/install/global.php b/install/global.php index 241dd0e..8b196a7 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.22.5