summaryrefslogtreecommitdiffstats
path: root/src/driver
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-12-15 09:05:08 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-12-15 09:05:08 +0000
commit8e72f649f07e972989a6ef00b8ca1ef1937a00d1 (patch)
tree4e1081a80aff77b1535ad81dd81049486c766975 /src/driver
parent453e95eb439d711997f2f8c3a6eb0c95d9bae12a (diff)
downloadzetacomponents-graph-8e72f649f07e972989a6ef00b8ca1ef1937a00d1.zip
zetacomponents-graph-8e72f649f07e972989a6ef00b8ca1ef1937a00d1.tar.gz
- Fixed: Bug #9823 (Failing tests with PHP 5.1)
# Test failed because of # a) (string) does not call __toString (now skipped) # b) different null parameter handling between 5.1 and 5.2 in imagepng # (workaround)
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/gd.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/driver/gd.php b/src/driver/gd.php
index d094bfd..19fa85d 100644
--- a/src/driver/gd.php
+++ b/src/driver/gd.php
@@ -1077,7 +1077,14 @@ class ezcGraphGdDriver extends ezcGraphDriver
switch ( $this->options->imageFormat )
{
case IMG_PNG:
- imagepng( $image, $file );
+ if ( $file === null )
+ {
+ imagepng( $image );
+ }
+ else
+ {
+ imagepng( $image, $file );
+ }
break;
case IMG_JPEG:
imagejpeg( $image, $file, $this->options->jpegQuality );
OpenPOWER on IntegriCloud