Error setting Configuration Backup Count
-
When setting the Backup Count to 0, I get the following error:
Warning: array_keys() expects parameter 1 to be array, null given in /etc/inc/config.lib.inc on line 757 Call Stack: 0.0001 233920 1\. {main}() /usr/local/www/diag_confbak.php:0 0.3597 2148800 2\. write_config() /usr/local/www/diag_confbak.php:41 2.1075 2492952 3\. cleanup_backupcache() /etc/inc/config.lib.inc:481 2.1091 2498584 4\. array_keys() /etc/inc/config.lib.inc:757 Warning: in_array() expects parameter 2 to be array, null given in /etc/inc/config.lib.inc on line 757 Call Stack: 0.0001 233920 1\. {main}() /usr/local/www/diag_confbak.php:0 0.3597 2148800 2\. write_config() /usr/local/www/diag_confbak.php:41 2.1075 2492952 3\. cleanup_backupcache() /etc/inc/config.lib.inc:481 2.1099 2498584 4\. in_array() /etc/inc/config.lib.inc:757 Warning: array_keys() expects parameter 1 to be array, null given in /etc/inc/config.lib.inc on line 757 Call Stack: 0.0001 233920 1\. {main}() /usr/local/www/diag_confbak.php:0 0.3597 2148800 2\. write_config() /usr/local/www/diag_confbak.php:41 2.1075 2492952 3\. cleanup_backupcache() /etc/inc/config.lib.inc:481 2.1109 2498528 4\. array_keys() /etc/inc/config.lib.inc:757 Warning: in_array() expects parameter 2 to be array, null given in /etc/inc/config.lib.inc on line 757 Call Stack: 0.0001 233920 1\. {main}() /usr/local/www/diag_confbak.php:0 0.3597 2148800 2\. write_config() /usr/local/www/diag_confbak.php:41 2.1075 2492952 3\. cleanup_backupcache() /etc/inc/config.lib.inc:481 2.1115 2498528 4\. in_array() /etc/inc/config.lib.inc:757 Warning: array_keys() expects parameter 1 to be array, null given in /etc/inc/config.lib.inc on line 777 Call Stack: 0.0001 233920 1\. {main}() /usr/local/www/diag_confbak.php:0 4.9383 2113096 2\. cleanup_backupcache() /usr/local/www/diag_confbak.php:92 4.9390 2113832 3\. get_backups() /etc/inc/config.lib.inc:697 4.9392 2113928 4\. array_keys() /etc/inc/config.lib.inc:777 Warning: sort() expects parameter 1 to be array, null given in /etc/inc/config.lib.inc on line 779 Call Stack: 0.0001 233920 1\. {main}() /usr/local/www/diag_confbak.php:0 4.9383 2113096 2\. cleanup_backupcache() /usr/local/www/diag_confbak.php:92 4.9390 2113832 3\. get_backups() /etc/inc/config.lib.inc:697 4.9398 2114112 4\. sort() /etc/inc/config.lib.inc:779 Warning: array_reverse() expects parameter 1 to be array, null given in /etc/inc/config.lib.inc on line 781 Call Stack: 0.0001 233920 1\. {main}() /usr/local/www/diag_confbak.php:0 4.9383 2113096 2\. cleanup_backupcache() /usr/local/www/diag_confbak.php:92 4.9390 2113832 3\. get_backups() /etc/inc/config.lib.inc:697 4.9403 2114112 4\. array_reverse() /etc/inc/config.lib.inc:781 Warning: Invalid argument supplied for foreach() in /etc/inc/config.lib.inc on line 781 Call Stack: 0.0001 233920 1\. {main}() /usr/local/www/diag_confbak.php:0 4.9383 2113096 2\. cleanup_backupcache() /usr/local/www/diag_confbak.php:92 4.9390 2113832 3\. get_backups() /etc/inc/config.lib.inc:697
This also seems to interfere with the Squid package at boot:
Crash report begins. Anonymous machine information: amd64 11.0-RELEASE-p7 FreeBSD 11.0-RELEASE-p7 #38 74fc727e9fd(RELENG_2_4): Fri Feb 17 00:26:24 CST 2017 root@buildbot2.netgate.com:/builder/ce/tmp/obj/builder/ce/tmp/FreeBSD-src/sys/pfSense Crash report details: PHP Errors: [17-Feb-2017 16:05:22 Europe/Berlin] PHP Warning: array_keys() expects parameter 1 to be array, null given in /etc/inc/config.lib.inc on line 757 [17-Feb-2017 16:05:22 Europe/Berlin] PHP Stack trace: [17-Feb-2017 16:05:22 Europe/Berlin] PHP 1\. {main}() /etc/rc.start_packages:0 [17-Feb-2017 16:05:22 Europe/Berlin] PHP 2\. sync_package() /etc/rc.start_packages:58 [17-Feb-2017 16:05:22 Europe/Berlin] PHP 3\. eval() /etc/inc/pkg-utils.inc:622 [17-Feb-2017 16:05:22 Europe/Berlin] PHP 4\. squid_resync() /etc/inc/pkg-utils.inc(622) : eval()'d code:1 [17-Feb-2017 16:05:22 Europe/Berlin] PHP 5\. squid_resync_antivirus() /usr/local/pkg/squid.inc:2002 [17-Feb-2017 16:05:22 Europe/Berlin] PHP 6\. squid_restart_antivirus() /usr/local/pkg/squid_antivirus.inc:383 [17-Feb-2017 16:05:22 Europe/Berlin] PHP 7\. squid_stop_antivirus() /usr/local/pkg/squid_antivirus.inc:797 [17-Feb-2017 16:05:22 Europe/Berlin] PHP 8\. squid_install_freshclam_cron() /usr/local/pkg/squid_antivirus.inc:833 [17-Feb-2017 16:05:22 Europe/Berlin] PHP 9\. install_cron_job() /usr/local/pkg/squid_antivirus.inc:90 [17-Feb-2017 16:05:22 Europe/Berlin] PHP 10\. write_config() /etc/inc/services.inc:2876 [17-Feb-2017 16:05:22 Europe/Berlin] PHP 11\. cleanup_backupcache() /etc/inc/config.lib.inc:481 [17-Feb-2017 16:05:22 Europe/Berlin] PHP 12\. array_keys() /etc/inc/config.lib.inc:757 [17-Feb-2017 16:05:22 Europe/Berlin] PHP Warning: in_array() expects parameter 2 to be array, null given in /etc/inc/config.lib.inc on line 757 [17-Feb-2017 16:05:22 Europe/Berlin] PHP Stack trace: [17-Feb-2017 16:05:22 Europe/Berlin] PHP 1\. {main}() /etc/rc.start_packages:0 [17-Feb-2017 16:05:22 Europe/Berlin] PHP 2\. sync_package() /etc/rc.start_packages:58 [17-Feb-2017 16:05:22 Europe/Berlin] PHP 3\. eval() /etc/inc/pkg-utils.inc:622 [17-Feb-2017 16:05:22 Europe/Berlin] PHP 4\. squid_resync() /etc/inc/pkg-utils.inc(622) : eval()'d code:1 [17-Feb-2017 16:05:22 Europe/Berlin] PHP 5\. squid_resync_antivirus() /usr/local/pkg/squid.inc:2002 [17-Feb-2017 16:05:22 Europe/Berlin] PHP 6\. squid_restart_antivirus() /usr/local/pkg/squid_antivirus.inc:383 [17-Feb-2017 16:05:22 Europe/Berlin] PHP 7\. squid_stop_antivirus() /usr/local/pkg/squid_antivirus.inc:797 [17-Feb-2017 16:05:22 Europe/Berlin] PHP 8\. squid_install_freshclam_cron() /usr/local/pkg/squid_antivirus.inc:833 [17-Feb-2017 16:05:22 Europe/Berlin] PHP 9\. install_cron_job() /usr/local/pkg/squid_antivirus.inc:90 [17-Feb-2017 16:05:22 Europe/Berlin] PHP 10\. write_config() /etc/inc/services.inc:2876 [17-Feb-2017 16:05:22 Europe/Berlin] PHP 11\. cleanup_backupcache() /etc/inc/config.lib.inc:481 [17-Feb-2017 16:05:22 Europe/Berlin] PHP 12\. in_array() /etc/inc/config.lib.inc:757 Filename: /var/crash/minfree 2048
-
Looks like the description needs updating, it should be rejecting anything less than 1 in that box. The client-side validation already attempts to block that from being entered.
-
https://redmine.pfsense.org/issues/7273
-
Great thanks! I can set it to 0 now without any errors. The errors on reboot have also gone.