Branch
On which branch did you notice this bug?
Description
How can the bug be reproduced? If you received an error or similar, please add it here.
How to reproduce:
When trying to register a user on my system I get the following error
Fatal error: Uncaught PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'language' at row 1 in /var/www/html/src/classes/wishthis/Database.php:65 Stack trace: #0 /var/www/html/src/classes/wishthis/Database.php(65): PDOStatement->execute() #1 /var/www/html/src/pages/register.php(139): wishthis\Database->query('INSERT INTO `us...', Array) #2 /var/www/html/index.php(140): require('/var/www/html/s...') #3 {main} thrown in /var/www/html/src/classes/wishthis/Database.php on line 65
Apparently this happens because my system is configured in the language "Spanish (Latin America)" which has the code es_419 which measures 6 characters in length, 1 character longer than that allowed by the "language" column of the "users" table
So I manually modified the length of the language column from 5 characters to 15, and the problem was solved, when performing the query I noticed the length of the language code described before, I share the result of the query
MariaDB [wishthis]> select id, language from users
-> ;
+----+----------+
| id | language |
+----+----------+
| 1 | es_419 |
+----+----------+
1 row in set (0.001 sec)
I hope this information is useful to correct the problem.
warm greetings
Disclaimer
wishthis is entirely built in my free time, mostly without any pay or code contributors. While I am doing my best to help out everybody, I cannot guarantee that I will find the time or have the competence to help you out.
I greatly appreciate that you are filing a bug report, these help tremendously! Thank you!
Branch
On which branch did you notice this bug?
Description
How can the bug be reproduced? If you received an error or similar, please add it here.
How to reproduce:
When trying to register a user on my system I get the following error
Apparently this happens because my system is configured in the language "Spanish (Latin America)" which has the code es_419 which measures 6 characters in length, 1 character longer than that allowed by the "language" column of the "users" table
So I manually modified the length of the language column from 5 characters to 15, and the problem was solved, when performing the query I noticed the length of the language code described before, I share the result of the query
I hope this information is useful to correct the problem.
warm greetings
Disclaimer
wishthis is entirely built in my free time, mostly without any pay or code contributors. While I am doing my best to help out everybody, I cannot guarantee that I will find the time or have the competence to help you out.
I greatly appreciate that you are filing a bug report, these help tremendously! Thank you!