mirror of
https://github.com/opnsense/core.git
synced 2026-10-12 02:20:36 +00:00
FileObject: remove +e where used as its always appended nowadays (https://github.com/opnsense/core/commit/55204f9d77b9cb74f314edd5f4b778bbb1aaccf3)
Just a precaution, if for some reason, php in a future version would crash on receiving the same modifier twice, it feels safer to not having it.
This commit is contained in:
@@ -412,7 +412,7 @@ abstract class BaseModel
|
||||
return $class_info->newInstance(true)->getNodeContent();
|
||||
}
|
||||
$cache_filename = self::getCacheFileName();
|
||||
$fobj = new \OPNsense\Core\FileObject($cache_filename, 'a+e', 0660, LOCK_EX, 'wwwonly:wheel');
|
||||
$fobj = new \OPNsense\Core\FileObject($cache_filename, 'a+', 0660, LOCK_EX, 'wwwonly:wheel');
|
||||
$cache_payload = $fobj->readJson() ?? [];
|
||||
if (!isset($cache_payload['persisted_at']) || $cache_payload['persisted_at'] != $persisted_at) {
|
||||
/**
|
||||
|
||||
@@ -45,7 +45,7 @@ class NetworkInterface extends BaseModel
|
||||
*/
|
||||
private function store_if_todo($id, $payload)
|
||||
{
|
||||
$fobj = new FileObject($this->todo_file, 'a+e', 0600, LOCK_EX);
|
||||
$fobj = new FileObject($this->todo_file, 'a+', 0600, LOCK_EX);
|
||||
$data = $fobj->readJson() ?? [];
|
||||
$data[$id] = array_merge($data[$id] ?? [], $payload);
|
||||
$fobj->truncate(0)->writeJson($data);
|
||||
|
||||
Reference in New Issue
Block a user