Project

General

Profile

Actions

Regression #13835

closed

Cron jobs are not properly removed

Added by Marcos M over 2 years ago. Updated over 2 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Configuration Backend
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Force Exclusion
Affected Version:
2.7.0
Affected Architecture:

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.

Actions #1

Updated by Marcos M over 2 years ago

  • Subject changed from Cron jobs are nto properly removed to Cron jobs are not properly removed
Actions #2

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)

Actions

Also available in: Atom PDF