From 932a7bf753d266f8110faa3a315592b74736f785 Mon Sep 17 00:00:00 2001 From: Ahmed Darrazi Date: Tue, 16 Dec 2025 20:13:41 +0100 Subject: [PATCH] bugfixes --- Dockerfile | 2 +- app/Http/Middleware/HandleInertiaRequests.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index bf85afca..86204ceb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -156,4 +156,4 @@ HEALTHCHECK --interval=60s --timeout=10s --start-period=30s --retries=5 \ CMD curl -f http://localhost:80/health || curl -f http://localhost:80/test.php || exit 1 # Start supervisor -CMD ["sh", "-c", "mkdir -p storage/framework/cache storage/framework/sessions storage/framework/views storage/logs bootstrap/cache && chown -R www-data:www-data storage bootstrap/cache && chmod -R 775 storage bootstrap/cache && /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf"] +CMD ["sh", "-c", "mkdir -p storage/framework/cache storage/framework/sessions storage/framework/views storage/logs bootstrap/cache && chown -R www-data:www-data storage bootstrap/cache && chmod -R 775 storage bootstrap/cache && if [ -f .env ]; then chown www-data:www-data .env || true; chmod 666 .env || true; fi && /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf"] diff --git a/app/Http/Middleware/HandleInertiaRequests.php b/app/Http/Middleware/HandleInertiaRequests.php index 0b3a07ee..9b055ea9 100644 --- a/app/Http/Middleware/HandleInertiaRequests.php +++ b/app/Http/Middleware/HandleInertiaRequests.php @@ -77,7 +77,7 @@ class HandleInertiaRequests extends Middleware } $direction = Cookie::get('direction', 'ltr'); - if (array_key_exists('direction', $system->fields)) { + if ($system && array_key_exists('direction', $system->fields)) { $systemDirection = $system->fields['direction']; if ($systemDirection !== 'none') { $direction = $systemDirection;