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.
1 parent f874707 commit 4fc6cfcCopy full SHA for 4fc6cfc
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[0];
1871
1872
1873
0 commit comments