Bug #5502
closedWarning: file_put_contents(): Filename cannot be empty in /etc/inc/pkg-utils.inc on line 123
100%
Description
After doing a reset to factory defaults, then config restore to put my test system back the way it was, the bootup installs the necessary packages. In this case I only had Cron package to install. The console reports:
Updating pfSense-core repository catalogue... metadata and fini package reinstallation
pfSense-core repository is up-to-date.
Updating pfSense repository catalogue...
pfSense repository is up-to-date.
All repositories are up-to-date.
Warning: file_put_contents(): Filename cannot be empty in /etc/inc/pkg-utils.inc on line 123
Call Stack:
0.0088 213808 1. {main}() /etc/rc.bootup:0
46.1314 1287848 2. package_reinstall_all() /etc/rc.bootup:399
46.1319 1288048 3. pkg_update() /etc/inc/pkg-utils.inc:973
51.4878 1288680 4. file_put_contents() /etc/inc/pkg-utils.inc:123
Updating package repository metadada...
Updating pfSense-core repository catalogue...
pfSense-core repository is up-to-date.
Updating pfSense repository catalogue...
pfSense repository is up-to-date.
All repositories are up-to-date.
done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):
Installed packages to be REINSTALLED:
pfSense-pkg-Cron-0.3.2 [pfSense]
[1/1] Reinstalling pfSense-pkg-Cron-0.3.2...
and so on.
Cron gets installed fine. I can't see any actual "bad thing" that has happened due to this PHP warning.
The code there is like:
if ($rc) {
file_put_contents($last_update_file, $now . "\n");
}
But $last_update_file is only defined inside a different "if" statement higher up, so it can sometimes be empty.