We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f874707 + d1d0470 commit d3e7663Copy full SHA for d3e7663
Image/Canvas/GD.php
@@ -1861,13 +1861,9 @@ function _version()
1861
}
1862
1863
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
- }
+ preg_match('/(\d+)\./', $version, $result );
+ return $result[1];
+
1871
1872
1873
0 commit comments