aboutsummaryrefslogtreecommitdiff
path: root/lib/lib_install.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-05-28 18:03:34 +0200
committerGravatar GitHub <noreply@github.com> 2023-05-28 18:03:34 +0200
commit0292b2f1f3a8cba3179467bba6c6af6bd0e97453 (patch)
tree65f2b10459c6046bc74556298a90d93187e80f1e /lib/lib_install.php
parenteeefbdf9c720790b83cc82fd981929bf4d699120 (diff)
Improve Dev Container (#5423)
* Improve Dev Container PHPStan was failing in Dev Container * Update Docker to Alpine Linux 3.18 * New DATA_PATH environment variable * README
Diffstat (limited to 'lib/lib_install.php')
-rw-r--r--lib/lib_install.php14
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/lib_install.php b/lib/lib_install.php
index 780115b63..80af02d4f 100644
--- a/lib/lib_install.php
+++ b/lib/lib_install.php
@@ -40,15 +40,11 @@ function checkRequirements(string $dbType = ''): array {
$xml = function_exists('xml_parser_create');
$json = function_exists('json_encode');
$mbstring = extension_loaded('mbstring');
- // @phpstan-ignore-next-line
- $data = DATA_PATH != '' && touch(DATA_PATH . '/index.html'); // is_writable() is not reliable for a folder on NFS
- // @phpstan-ignore-next-line
- $cache = CACHE_PATH != '' && touch(CACHE_PATH . '/index.html');
- $tmp = TMP_PATH != '' && is_writable(TMP_PATH);
- // @phpstan-ignore-next-line
- $users = USERS_PATH != '' && touch(USERS_PATH . '/index.html');
- // @phpstan-ignore-next-line
- $favicons = DATA_PATH != '' && touch(DATA_PATH . '/favicons/index.html');
+ $data = is_dir(DATA_PATH) && touch(DATA_PATH . '/index.html'); // is_writable() is not reliable for a folder on NFS
+ $cache = is_dir(CACHE_PATH) && touch(CACHE_PATH . '/index.html');
+ $tmp = is_dir(TMP_PATH) && is_writable(TMP_PATH);
+ $users = is_dir(USERS_PATH) && touch(USERS_PATH . '/index.html');
+ $favicons = is_dir(DATA_PATH) && touch(DATA_PATH . '/favicons/index.html');
return array(
'php' => $php ? 'ok' : 'ko',