Skip to content

Commit 9bf9732

Browse files
committed
fix: throw more exceptions for errors
1 parent 544bce4 commit 9bf9732

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

phpmyfaq/src/phpMyFAQ/Setup/Upgrade.php

+14
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,20 @@ public function checkFilesystem(): bool
6262
throw new Exception('The folder ' . $this->upgradeDirectory . ' is missing.');
6363
}
6464
}
65+
66+
if (!is_dir(PMF_CONTENT_DIR . '/user/attachments')) {
67+
throw new Exception('The folder /content/user/attachments is missing.');
68+
}
69+
if (!is_dir(PMF_CONTENT_DIR . '/user/images')) {
70+
throw new Exception('The folder /content/user/images is missing.');
71+
}
72+
if (!is_dir(PMF_CONTENT_DIR . '/core/data')) {
73+
throw new Exception('The folder /content/core/data is missing.');
74+
}
75+
if (!is_dir(PMF_ROOT_DIR . '/assets/themes')) {
76+
throw new Exception('The folder /phpmyfaq/assets/themes is missing.');
77+
}
78+
6579
if (
6680
is_dir(PMF_CONTENT_DIR . '/user/attachments') &&
6781
is_dir(PMF_CONTENT_DIR . '/user/images') &&

tests/content/core/data/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)