An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
refactor(DynamicConfigurations): improve handling of dynamic configuration content by ensuring fallback to empty string when content is null
Andras Bacsai4bc9786046f3
diff --git a/app/Livewire/Server/Proxy/DynamicConfigurations.php b/app/Livewire/Server/Proxy/DynamicConfigurations.phpindex 6277a24bd4..7db890638d 100644--- a/app/Livewire/Server/Proxy/DynamicConfigurations.php+++ b/app/Livewire/Server/Proxy/DynamicConfigurations.php@@ -38,7 +38,8 @@ class DynamicConfigurations extends Component$contents = collect([]);foreach ($files as $file) {$without_extension = str_replace('.', '|', $file);- $contents[$without_extension] = instant_remote_process(["cat {$proxy_path}/dynamic/{$file}"], $this->server);+ $content = instant_remote_process(["cat {$proxy_path}/dynamic/{$file}"], $this->server);+ $contents[$without_extension] = $content ?? '';}$this->contents = $contents;$this->dispatch('$refresh');diff --git a/resources/views/livewire/server/proxy/dynamic-configurations.blade.php b/resources/views/livewire/server/proxy/dynamic-configurations.blade.phpindex 30400ef734..1dddbe433d 100644--- a/resources/views/livewire/server/proxy/dynamic-configurations.blade.php+++ b/resources/views/livewire/server/proxy/dynamic-configurations.blade.php@@ -38,7 +38,7 @@wire:model="contents.{{ $fileName }}" rows="5" />@else<livewire:server.proxy.dynamic-configuration-navbar :server_id="$server->id"- :fileName="$fileName" :value="$value" :newFile="false"+ :fileName="$fileName" :value="$value ?? ''" :newFile="false"wire:key="{{ $fileName }}-{{ $loop->index }}" /><x-forms.textarea disabled wire:model="contents.{{ $fileName }}"rows="10" />