installer checks - remove unwanted empty or system32 path parts

and wrong system32/convert.exe path on WIN, which is not ImageMagick!
This commit is contained in:
Ian 2014-11-24 11:43:27 +01:00
parent 2e1240ba22
commit 9545fcbbc9

View File

@ -233,6 +233,9 @@ function serendipity_query_default($optname, $default, $usertemplate = false, $t
if (isset($_SERVER['PATH'])) {
$path = array_merge($path, explode(PATH_SEPARATOR, $_SERVER['PATH']));
// remove unwanted empty or system32 path parts and wrong system32/convert.exe path on WIN, which is not ImageMagick!
foreach ($path as $pk => $pv) { if (stripos($pv, 'system32') !== false || empty($pv)) { unset($path[$pk]); } }
$path = array_values($path); // 'reindex' array
}
/* add some other possible locations to the path while we are at it,