From 36110da4bffde9d7dde3d9c57d1a8e28e0882064 Mon Sep 17 00:00:00 2001 From: Regis Houssin <regis.houssin@capnetworks.com> Date: Tue, 6 Sep 2016 17:22:56 +0200 Subject: [PATCH] Fix: Warning: preg_match(): No ending delimiter '/' found --- htdocs/filefunc.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 87718a143e9..37e4b9eb098 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -92,7 +92,7 @@ if (! $result && ! empty($_SERVER["GATEWAY_INTERFACE"])) // If install not do $path=$_SERVER["CONTEXT_PREFIX"]; // example '/dolibarr/' when using an apache alias. if (! preg_match('/\/$/', $path)) $path.='/'; } - else if (preg_match('/index\.php', $_SERVER['PHP_SELF'])) + else if (preg_match('/index\.php/', $_SERVER['PHP_SELF'])) { // When we ask index.php, we MUST BE SURE that $path is '' at the end. This is required to make install process // when using apache alias like '/dolibarr/' that point to htdocs. @@ -113,11 +113,11 @@ if (! $result && ! empty($_SERVER["GATEWAY_INTERFACE"])) // If install not do if (empty($TDir[$i]) || $TDir[$i] == 'htdocs') break; if ($TDir[$i] == 'dolibarr') break; if (substr($TDir[$i], -4, 4) == '.php') continue; - + $path .= '../'; } } - + header("Location: ".$path."install/index.php"); exit; } -- GitLab