diff --git a/extend/catcher/CatchAdmin.php b/extend/catcher/CatchAdmin.php index 4f4066a..bd5390f 100644 --- a/extend/catcher/CatchAdmin.php +++ b/extend/catcher/CatchAdmin.php @@ -227,7 +227,11 @@ class CatchAdmin $info['enable'] = true; - file_put_contents($moduleJson, \json_encode($info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE)); + if (!is_writeable($moduleJson)) { + chmod($moduleJson, 666); + } + + file_put_contents($moduleJson, \json_encode($info, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)); return true; } @@ -251,6 +255,10 @@ class CatchAdmin $info['enable'] = false; + if (!is_writeable($moduleJson)) { + chmod($moduleJson, 666); + } + file_put_contents($moduleJson, \json_encode($info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE)); return true;