Bug Report #4735

Image_GD: GD_BUNDLED check is too coarse

Added by Bharat Mediratta over 1 year ago. Updated about 1 year ago.

Status:ClosedStart date:04/25/2013
Priority:NormalDue date:
Assignee:Woody Gilk% Done:

100%

Category:-
Target version:Kohana v3.x - 3.3.1
Resolution:fixed Points:1

Description

In my setup, GD_BUNDLED is false but I have most of the functions that are covered by that check.

Test code:

    print "GD_BUNDLED: " . GD_BUNDLED . "<br>";
    foreach (array("imagerotate", "imageconvolution", "imagefilter", "imagelayereffect") as $f) {
      print "function_exists($f) == [" . (int)function_exists($f) . "]<br>";
    }

yields:

GD_BUNDLED: 0
function_exists(imagerotate) == [1]
function_exists(imageconvolution) == [1]
function_exists(imagefilter) == [1]
function_exists(imagelayereffect) == [0]

Not exactly sure what's going on here, but the GD_BUNDLED check is too coarse for my setup. I propose that we do surgical function_exists() checks instead and cache that result in a static variable. I am happy to code it up and submit a pull request if you guys agree and want to pull this in.

My config:

OS: Debian 7.0
PHP: 5.4.4-10
Apache: 2.2.22-12
GD: php5-gd 5.4.4-10

History

#4 Updated by Robert-Jan Dreu -rjd22- about 1 year ago

This has been merged by shadowhand and can be closed

#5 Updated by Lorenzo Pisani about 1 year ago

  • Status changed from New to Closed
  • Assignee set to Woody Gilk
  • % Done changed from 0 to 100
  • Resolution set to fixed

This seems like a slight API break and should have gone in 3.4 but I'll let Woody decide if he wants to change this.

Also available in: Atom PDF