VPN: OpenVPN: Connection Status - fix "attempt to read property...", closes https://github.com/opnsense/core/issues/7388

This commit is contained in:
Ad Schellevis 2024-04-17 20:32:59 +02:00
parent 80b65b0d5d
commit 8071c8700f
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ class ServiceController extends ApiControllerBase
$route_entry['id'] = $idx;
$route_entry['description'] = '';
if (!empty($config_payload[$idx])) {
$route_entry['description'] = (string)$config_payload[$idx]->description ?? '';
$route_entry['description'] = (string)$config_payload[$idx]['description'] ?? '';
}
$records[] = $route_entry;
}