Skip to content

Commit 5f47566

Browse files
committed
Рефакторинг.
1 parent 949c50e commit 5f47566

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Subscribers/OnAfterSaveOptionsHandler.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ public function handler() : void
2626
&&
2727
OptionsManager::option('native_config_file_path')
2828
) {
29+
if (!@file_exists($_SERVER['DOCUMENT_ROOT'] . '/local/routes/')) {
30+
@mkdir($_SERVER['DOCUMENT_ROOT'] . '/local/routes/', 0777);
31+
}
32+
2933
$filePath = $_SERVER['DOCUMENT_ROOT'] . '/local/routes/' . OptionsManager::option('php_router_config_path');
3034
if (@file_exists($filePath)
3135
&& !$this->isFilesAreEqual($filePath, __DIR__ . '/../../configs/route_config_template.php.tmpl')) {

0 commit comments

Comments
 (0)