Oddly enough I can't reproduce the PHP error but I can see where it would happen (and should happen). I've got a change that should fix it, though:
https://redmine.pfsense.org/issues/13876
index 18bb573b0c..21d1847e09 100644
--- a/src/usr/local/www/diag_backup.php
+++ b/src/usr/local/www/diag_backup.php
@@ -268,10 +268,12 @@ $section->add($group);
$form->add($section);
-if (($config['installedpackages']['package'] != "") || (is_subsystem_dirty("packagelock"))) {
+$has_installed_packages = !empty(config_get_path('installedpackages/package', []));
+
+if ($has_installed_packages || (is_subsystem_dirty("packagelock"))) {
$section = new Form_Section('Package Functions');
- if ($config['installedpackages']['package'] != "") {
+ if ($has_installed_packages) {
$group = new Form_Group('');
// Note: ID attribute of each element created is to be unique. Not being used, suppressing it.
$group->add(new Form_Button(