Skip to content

Commit 4fc6cfc

Browse files
committed
Update GD.php
1 parent f874707 commit 4fc6cfc

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Image/Canvas/GD.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1861,13 +1861,9 @@ function _version()
18611861
}
18621862
}
18631863

1864-
if (preg_match('/1\.[0-9]{1,2}/', $version)) {
1865-
return 1;
1866-
} elseif (preg_match('/2\.[0-9]{1,2}/', $version)) {
1867-
return 2;
1868-
} else {
1869-
return 0;
1870-
}
1864+
preg_match('/\d/', $version, $result );
1865+
1866+
return $result[0];
18711867
}
18721868

18731869
}

0 commit comments

Comments
 (0)