Set key value pair with key having all digits (eg:- '123') and save.
Set key value pair with key having at least one alphabet (eg:- 'abc') and save.
Set key value pair again with any generic value (eg:- 'efg') and save.
On the third insertion, getting the error,
"SQLSTATE[22007]: Invalid datetime format: 1292 Truncated incorrect DOUBLE value: 'abc' (SQL: update `settings` set `value` = , `updated_at` = 1589182653 where `entity_type` = {entity_type} and `entity_id` = {entity_id} and `module` = {module_type} and `key` = 123)"
This is due to implicit conversion of string into integer inside for loop for updating in write function().
This can be solved by explicit conversion of $key to string in write() function in DatabaseSettingsStore.php.
Reproducing the problem which I am been facing :
On the third insertion, getting the error,
"SQLSTATE[22007]: Invalid datetime format: 1292 Truncated incorrect DOUBLE value: 'abc' (SQL: update `settings` set `value` = , `updated_at` = 1589182653 where `entity_type` = {entity_type} and `entity_id` = {entity_id} and `module` = {module_type} and `key` = 123)"
This is due to implicit conversion of string into integer inside for loop for updating in write function().
This can be solved by explicit conversion of $key to string in
write()
function inDatabaseSettingsStore.php
.