Skip to content

Commit

Permalink
Fix config file read by removing dirname() from ROOTDIR
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jas8522 committed Aug 6, 2021
1 parent 81490cc commit 4b51733
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/servers/solusvmpro/lib/SolusVM.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

}

Expand Down

0 comments on commit 4b51733

Please sign in to comment.