From 4b51733238b367e93eb03f83ef5a3d82e7f168a0 Mon Sep 17 00:00:00 2001 From: Jordan Schelew Date: Thu, 5 Aug 2021 21:02:39 -0300 Subject: [PATCH] Fix config file read by removing dirname() from ROOTDIR dirname() is not needed here. We also add the INI_SCANNER_TYPED scanner mode to ensure true becomes strictly converted to TRUE. This isn't essential to fix this bug, but it could come in handy if someone accidentally uses strings in the config file. --- modules/servers/solusvmpro/lib/SolusVM.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/servers/solusvmpro/lib/SolusVM.php b/modules/servers/solusvmpro/lib/SolusVM.php index f97f585..ae10e85 100644 --- a/modules/servers/solusvmpro/lib/SolusVM.php +++ b/modules/servers/solusvmpro/lib/SolusVM.php @@ -103,8 +103,7 @@ public function __construct( $params, $debug = false ) { $this->pid = $this->getParam( "pid" ); # Product/Service ID //Parse Ini file - $config_file = dirname(ROOTDIR) . '/modules/servers/solusvmpro/configure.ini'; - $this->configIni = parse_ini_file( $config_file ); + $this->configIni = parse_ini_file( ROOTDIR . '/modules/servers/solusvmpro/configure.ini', false, INI_SCANNER_TYPED ); }