Regression #13835
closedCron jobs are not properly removed
0%
Description
See https://redmine.pfsense.org/issues/13827#note-4
Instead, I believe this issue was introduced by a recent change to the install_cron_job() function in /etc/inc/services.inc to address a PHP 8.1 issue with direct $config array access.
The recent change added a call to config_get_path() inside of the array_splice() function call beginning on line 3492 of /etc/inc/services.inc . My understanding is config_get_path() returns a copy of the requested array element and not a direct reference to the array element. Therefore the array_splice() operation is removing the cron job from a copy of $config and not directly from $config as needed. So, on the call to configure_cron() a little farther down at line 3507, the unmodified actual $config array (with the cron job still in place) is written back to disk.
Updated by Marcos M over 2 years ago
- Subject changed from Cron jobs are nto properly removed to Cron jobs are not properly removed
Updated by Jim Pingle over 2 years ago
- Status changed from New to Duplicate
Duplicate of https://redmine.pfsense.org/issues/13833 (fix already committed)