From f5088d46415fd042114d8e29ca71167a43f068f0 Mon Sep 17 00:00:00 2001 From: Stiliyan Tonev Date: Wed, 24 May 2023 00:47:03 +0300 Subject: [PATCH] fix: Allow commenting out backend.cfg Regarding issue [#950](https://github.com/cytopia/devilbox/issues/950) Did not see any processing regarding if the option is commented out or not. Now we check if the first symbol is a semicolon (;) and in case it is, we return `default` rather than the commented out option. --- .devilbox/www/include/lib/container/Httpd.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.devilbox/www/include/lib/container/Httpd.php b/.devilbox/www/include/lib/container/Httpd.php index 7dda42f9c..bd54e792e 100644 --- a/.devilbox/www/include/lib/container/Httpd.php +++ b/.devilbox/www/include/lib/container/Httpd.php @@ -217,6 +217,10 @@ public function getVhostBackend($vhost) $cont = stream_get_contents($fp); fclose($fp); + $semicolon_pos = strpos($cont, ';'); + if($semicolon_pos !== false && $semicolon_pos == 0) { + return 'default'; + } // conf:::: $arr = explode(':', $cont);