Skip to content

Commit 031e944

Browse files
committed
corrections coderabbitai 4
1 parent 85be4bf commit 031e944

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

class/Common/DirectoryChecker.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,18 +141,18 @@ public static function dirExists($dir_path)
141141
if (!\Xmf\Request::hasVar('path', 'POST') || !\Xmf\Request::hasVar('redirect', 'POST')) {
142142
break;
143143
}
144-
$path = \Xmf\Request::getString('path', 'POST');
145-
$redirect = \Xmf\Request::getString('redirect', 'POST');
144+
$path = \Xmf\Request::getString('path','', 'POST');
145+
$redirect = \Xmf\Request::getString('redirect','', 'POST');
146146
$msg = DirectoryChecker::createDirectory($path) ? \constant('CO_' . $moduleDirNameUpper . '_' . 'DC_DIRCREATED') : \constant('CO_' . $moduleDirNameUpper . '_' . 'DC_DIRNOTCREATED');
147147
\redirect_header($redirect, 2, $msg . ': ' . $path);
148148
break;
149149
case 'setdirperm':
150150
if (!\Xmf\Request::hasVar('path', 'POST') || !\Xmf\Request::hasVar('redirect', 'POST') || !\Xmf\Request::hasVar('mode', 'POST')) {
151151
break;
152152
}
153-
$path = \Xmf\Request::getString('path');
154-
$redirect = \Xmf\Request::getString('redirect');
155-
$mode = \Xmf\Request::getInt('mode');
153+
$path = \Xmf\Request::getString('path','', 'POST');
154+
$redirect = \Xmf\Request::getString('redirect','', 'POST');
155+
$mode = \Xmf\Request::getInt('mode','', 'POST');
156156
$msg = DirectoryChecker::setDirectoryPermissions($path, $mode) ? \constant('CO_' . $moduleDirNameUpper . '_' . 'DC_PERMSET') : \constant('CO_' . $moduleDirNameUpper . '_' . 'DC_PERMNOTSET');
157157

158158
\redirect_header($redirect, 2, $msg . ': ' . $path);

class/Files/Language/LanguageHelp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function render()
110110
if ('english' !== $language) {
111111
$this->create($moduleDirname, 'language/' . $language . '/help', $filename, $content, \_AM_MODULEBUILDER_FILE_CREATED, \_AM_MODULEBUILDER_FILE_NOTCREATED);
112112
if (!$this->renderFile()) {
113-
throw new \RuntimeException("The help.tpl file in 'language/" . $language . "/help' could not be created.");
113+
throw new \RuntimeException("The {$filename} file in 'language/" . $language . "/help' could not be created.");
114114
}
115115
}
116116
$this->create($moduleDirname, 'language/english/help', $filename, $content, \_AM_MODULEBUILDER_FILE_CREATED, \_AM_MODULEBUILDER_FILE_NOTCREATED);

0 commit comments

Comments
 (0)