Changeset 601 for trunk/lib/DB.inc.php
- Timestamp:
- Apr 27, 2017 4:43:35 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/DB.inc.php
r575 r601 65 65 // Script stops on db error. TRUE recommended for production sites. 66 66 'db_die_on_failure' => true, 67 68 // Special date settings. These will dynamically changes depending on MySQL version or settings. 69 'zero_date' => '0000-00-00', 70 'infinity_date' => '9999-12-31', 67 71 ); 68 72 … … 78 82 79 83 /** 84 * Constructor. 85 */ 86 public function __construct() 87 { 88 // Initialize default parameters. 89 $this->_params = array_merge($this->_params, $this->_param_defaults); 90 } 91 92 /** 80 93 * This method enforces the singleton pattern for this class. 81 94 * … … 181 194 } else { 182 195 $app->logMsg(sprintf('%s is not a known character_set.', $app->getParam('character_set')), LOG_ERR, __FILE__, __LINE__); 196 } 197 198 // Update config for this version of MySQL. 199 if (version_compare(mysql_get_server_info(), '5.7.4', '>=')) { 200 $this->setParam(array('zero_date' => '1000-01-01')); 183 201 } 184 202
Note: See TracChangeset
for help on using the changeset viewer.