Fix issue with PHP error written to system.log

Thanks for the recommendation @oraclesod
This commit is contained in:
Dallas 2020-05-12 15:59:56 -05:00 committed by GitHub
parent b4f9d77bd5
commit c8be287ad7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,15 @@
# Modified 17 Oct 2019 # Modified 17 Oct 2019
require_once("pkg-utils.inc"); require_once("pkg-utils.inc");
$system_pkg_version = get_system_pkg_version(); global $g;
if (file_exists("{$g['varrun_path']}/pkg.dirty")) {
$system_pkg_version = get_system_pkg_version(false,false);
} else {
shell_exec("sudo touch "."{$g['varrun_path']}/pkg.dirty");
$system_pkg_version = get_system_pkg_version(false,false);
shell_exec("sudo rm " . "{$g['varrun_path']}/pkg.dirty");
}
$current_installed_buildtime = trim(file_get_contents("/etc/version.buildtime")); $current_installed_buildtime = trim(file_get_contents("/etc/version.buildtime"));