-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 13
-
Fix Version/s: 13
-
Component/s: Asterisk Logfiles
-
Labels:None
-
Asterisk Version:13.7.2
-
Distro:Self Install Debian
Adding 3 or more log file entries with blank file names causes FreePBX 13 to crash when Submit/Apply is clicked:
FATAL ERROR
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'PRIMARY'
Trace Back
: die_freepbx()
[0]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'PRIMARY'
/var/www/html/admin/libraries/sql.functions.php:138 call_user_func()
[0]: die_freepbx
[1]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'PRIMARY'
/var/www/html/admin/modules/logfiles/functions.inc.php:348 db_e()
/var/www/html/admin/modules/logfiles/header.php:39 logfiles_put_opts()
/var/www/html/admin/modules/logfiles/page.logfiles_settings.php:2 require_once()
[0]: /var/www/html/admin/modules/logfiles/header.php
/var/www/html/admin/config.php:555 include()
[0]: /var/www/html/admin/modules/logfiles/page.logfiles_settings.php
A much better way to implement this would be to not show any empty log entries until the '+ Add Log' button is clicked. When the Submit button Is clicked, first remove any empty log entries before doing anything else.