Fixes to allow the GD detection to work on PHP 4.3.0 (with bundled GD)

This commit is contained in:
moodler 2002-12-28 14:45:54 +00:00
parent 57117c20d5
commit 92a4b0f180

View file

@ -1100,12 +1100,16 @@ function check_gd_version() {
$gdversion = 0;
foreach ($phpinfo as $text) {
$parts = explode('</b>',$text);
$parts = explode('</td>',$text);
foreach ($parts as $key => $val) {
$parts[$key] = strip_tags($val);
$parts[$key] = trim(strip_tags($val));
}
if ($parts[0] == "GD Version") {
if (substr_count($parts[1], "2.0")) {
$parts[1] = "2.0";
}
if ($parts[0]=="GD Version") {
$gdversion = intval($parts[1]);
}
}