mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Fixes to allow the GD detection to work on PHP 4.3.0 (with bundled GD)
This commit is contained in:
parent
57117c20d5
commit
92a4b0f180
1 changed files with 7 additions and 3 deletions
|
@ -1100,12 +1100,16 @@ function check_gd_version() {
|
||||||
|
|
||||||
$gdversion = 0;
|
$gdversion = 0;
|
||||||
|
|
||||||
|
|
||||||
foreach ($phpinfo as $text) {
|
foreach ($phpinfo as $text) {
|
||||||
$parts = explode('</b>',$text);
|
$parts = explode('</td>',$text);
|
||||||
foreach ($parts as $key => $val) {
|
foreach ($parts as $key => $val) {
|
||||||
$parts[$key] = strip_tags($val);
|
$parts[$key] = trim(strip_tags($val));
|
||||||
}
|
}
|
||||||
if ($parts[0] == "GD Version") {
|
if ($parts[0] == "GD Version") {
|
||||||
|
if (substr_count($parts[1], "2.0")) {
|
||||||
|
$parts[1] = "2.0";
|
||||||
|
}
|
||||||
$gdversion = intval($parts[1]);
|
$gdversion = intval($parts[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue