File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 129129 $ coursePath = $ values ['course_path ' ];
130130 $ homePath = $ values ['home_path ' ];
131131 $ confFile = $ values ['configuration_file ' ];
132+ $ uploadPath = $ values ['upload_path ' ];
132133
133- if (is_dir ($ coursePath ) &&
134- is_dir ($ homePath ) &&
135- file_exists ($ confFile ) &&
136- is_readable ($ confFile )
137- ) {
134+ $ isPharFile = str_starts_with ($ confFile , 'phar:// ' )
135+ || str_starts_with ($ coursePath , 'phar:// ' )
136+ || str_starts_with ($ homePath , 'phar:// ' )
137+ || str_starts_with ($ uploadPath , 'phar:// ' );
138+
139+ $ isWritable = is_dir ($ coursePath )
140+ && is_dir ($ homePath )
141+ && is_dir ($ uploadPath )
142+ && file_exists ($ confFile )
143+ && is_readable ($ confFile );
144+
145+ if (!$ isPharFile && $ isWritable ) {
138146 $ currentHost = api_get_configuration_value ('db_host ' );
139147 $ currentDatabase = api_get_configuration_value ('main_database ' );
140148 $ currentUser = api_get_configuration_value ('db_user ' );
You can’t perform that action at this time.
0 commit comments