diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-12-15 09:05:08 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-12-15 09:05:08 +0000 |
commit | 8e72f649f07e972989a6ef00b8ca1ef1937a00d1 (patch) | |
tree | 4e1081a80aff77b1535ad81dd81049486c766975 | |
parent | 453e95eb439d711997f2f8c3a6eb0c95d9bae12a (diff) | |
download | zetacomponents-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)
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/driver/gd.php | 9 | ||||
-rw-r--r-- | tests/matrix_test.php | 5 |
3 files changed, 14 insertions, 1 deletions
@@ -6,6 +6,7 @@ absoluteTreshHold to absoluteThreshold - Added feature #9647: Add render to output method +- Fixed issue #9823: Failing tests with PHP 5.1 - Fixed issue #9795: Interferring bars, when bars count is higher then major step count - Fixed issue #9764: 3D Pie chart segment side polygon in front of circular 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 ); diff --git a/tests/matrix_test.php b/tests/matrix_test.php index 7c0c810..9bf263a 100644 --- a/tests/matrix_test.php +++ b/tests/matrix_test.php @@ -322,6 +322,11 @@ class ezcGraphMatrixTest extends ezcTestCase public function testMatrixToString() { + if ( version_compare( phpversion(), '5.2', '<' ) ) + { + $this->markTestSkipped( "This test requires PHP 5.2 or later." ); + } + $matrix = new ezcGraphMatrix(); $this->assertEquals( |