Last active
September 30, 2019 00:54
-
-
Save LiamKarlMitchell/9c31b31358ece3218b55a16e8b5da320 to your computer and use it in GitHub Desktop.
Fix vtiger not able to save field changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ($this->dbType === 'mysql' || $this->dbType === 'mysqli') { | |
$this->database->Execute("SET SESSION sql_mode = 'ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'"); | |
} | |
// Either in the mysql config or if you don't want to touch it there you can edit the include/database/PearDatabase.php and put that statement at the bottom of the function connect. | |
// And for setup | |
// Edit the | |
// modules/Install/models/Utils.php | |
// After the mysql_server_version = self::getMySQLVersion($serverInfo); | |
// Put this to set the options for the sql mode for the session. | |
$conn->Execute("SET SESSION sql_mode = 'ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment