Topic: LuxCal 5.2.0 SQL error Invalid datetime format when upgrading

When upgrading to calendar V5.2 or when restoring a databse backup file via the Database page, depending on the MySQL database configuration, the following SQL error message may occur:

SQL query error: SQLSTATE[22007]: Invalid datetime format: 1292 Truncated incorrect DOUBLE value: ''
Query string: UPDATE `mycal_settingsX` SET `value` = '' WHERE (`name` = 'spMiniCal' OR `name` = 'spImages' OR `name` = 'spInfoArea') AND `value` = 0

This can be solved by editing the file "common/toolboxx.php" and on line 877 and 878 enclosing the values 0 and 1 in single quotes. In other words, change . . .

AND `value` = 0");

to . . .

AND `value` = '0'");

and change . . .

AND `value` = 1");

to . . .

AND `value` = '1'");

Roel