You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is weird. It's been a while since I've worked on this project (I really have to pick it up again...) but I just looked into it and it seems the problem is that (for a new check/reply attribute) an empty string is inserted for the id in a query, which should have been NULL.
The weird part is that I can't reproduce this bug; it works fine here. After some research I think this might be because of MySQL Strict Mode, which seems to be enabled by default in MySQL 5.7.
You can check if this is enabled for you by executing this query: SHOW VARIABLES LIKE 'sql_mode';.
If this is indeed the cause of the problem, a quick workaround would be to disable Strict SQL Mode. Of course I understand this is not ideal and that the application should use NULL instead of empty string in such occasions. I'll be sure to fix this when I have time to look into it.
PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'id' at row 1 in /var/www/intranet/radiusadmin/app/classes/RadEntityMapper.php:174\nStack trace:\n#0 /var/www/intranet/radiusadmin/app/classes/RadEntityMapper.php(174): PDOStatement->execute()\n#1 /var/www/intranet/radiusadmin/app/classes/RadEntityMapper.php(108): RadEntityMapper->saveAttrs('radreply', 'BockTablet', Array)\n#2 /var/www/intranet/radiusadmin/app/pages/users_edit.php(50): RadEntityMapper->save(Object(RadEntity))\n#3 /var/www/intranet/radiusadmin/public_html/index.php(44): include('/var/www/intran...')\n#4 {main}\n thrown in /var/www/intranet/radiusadmin/app/classes/RadEntityMapper.php on line 174, referer: http://<serverip>/radiusadmin/public_html/index.php?page=users_new
Any Ideas?
The text was updated successfully, but these errors were encountered: