mirror of
https://github.com/unraid/webgui.git
synced 2025-12-30 22:20:23 -06:00
Merge pull request #2372 from Squidly271/patch-2
Fix PHP errors if file doesn't exist my_parse_ini_file
This commit is contained in:
@@ -730,7 +730,7 @@ if ($method == 'check') {
|
||||
if ($installed_plugin_file === false) {
|
||||
write("plugin: not installed\n");
|
||||
// run hook scripts for post processing
|
||||
post_hooks($error);
|
||||
post_hooks(1);
|
||||
done(1);
|
||||
}
|
||||
$installed_pluginURL = plugin('pluginURL', $installed_plugin_file, $error);
|
||||
|
||||
@@ -45,7 +45,7 @@ function my_parse_ini_string($text, $sections=false, $scanner=INI_SCANNER_NORMAL
|
||||
}
|
||||
|
||||
function my_parse_ini_file($file, $sections=false, $scanner=INI_SCANNER_NORMAL) {
|
||||
return my_parse_ini_string(file_get_contents($file),$sections,$scanner);
|
||||
return my_parse_ini_string(@file_get_contents($file),$sections,$scanner);
|
||||
}
|
||||
|
||||
function parse_plugin_cfg($plugin, $sections=false, $scanner=INI_SCANNER_NORMAL) {
|
||||
|
||||
Reference in New Issue
Block a user