mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Prevent warningx in get_classname
This commit is contained in:
@@ -39,9 +39,12 @@
|
||||
//function to parse a FusionPBX service from a .service file
|
||||
if (!function_exists('get_classname')) {
|
||||
function get_classname(string $file) {
|
||||
if (!file_exists($file)) {
|
||||
return '';
|
||||
}
|
||||
$parsed = parse_ini_file($file);
|
||||
$exec_cmd = $parsed['ExecStart'];
|
||||
$parts = explode(' ', $exec_cmd);
|
||||
$exec_cmd = $parsed['ExecStart'] ?? '';
|
||||
$parts = explode(' ', $exec_cmd ?? '');
|
||||
$php_file = $parts[1] ?? '';
|
||||
if (!empty($php_file)) {
|
||||
return $php_file;
|
||||
|
||||
@@ -28,6 +28,7 @@ Con Portions created by the Initial Developer are Copyright (C) 2008-2025
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
if (!permission_exists('system_view_info')
|
||||
|| !permission_exists('system_view_cpu')
|
||||
|
||||
Reference in New Issue
Block a user