From b282c9f8f3af0d66cd92e9f0c9397374aea86be8 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 19 Mar 2013 10:51:39 +0100 Subject: [PATCH] Fixed deprecated GD usage --- filesystem/GD.php | 6 ++---- tests/filesystem/GDTest.php | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/filesystem/GD.php b/filesystem/GD.php index 542c25c6b..b2b632618 100644 --- a/filesystem/GD.php +++ b/filesystem/GD.php @@ -57,8 +57,7 @@ class GDBackend extends Object implements Image_Backend { } public function setGD($gd) { - Deprecation::notice('3.1', 'Use GD::setImageResource instead', - Deprecation::SCOPE_CLASS); + Deprecation::notice('3.1', 'Use GD::setImageResource instead'); return $this->setImageResource($gd); } @@ -67,8 +66,7 @@ class GDBackend extends Object implements Image_Backend { } public function getGD() { - Deprecation::notice('3.1', 'GD::getImageResource instead', - Deprecation::SCOPE_CLASS); + Deprecation::notice('3.1', 'GD::getImageResource instead'); return $this->getImageResource(); } diff --git a/tests/filesystem/GDTest.php b/tests/filesystem/GDTest.php index 3b33436d9..4f331915e 100644 --- a/tests/filesystem/GDTest.php +++ b/tests/filesystem/GDTest.php @@ -46,8 +46,8 @@ class GDTest extends SapphireTest { $samples = array(); for($y = 0; $y < $vertical; $y++) { for($x = 0; $x < $horizontal; $x++) { - $colour = imagecolorat($gd->getGD(), $x * 5, $y * 5); - $samples[] = ImageColorsforIndex($gd->getGD(), $colour); + $colour = imagecolorat($gd->getImageResource(), $x * 5, $y * 5); + $samples[] = ImageColorsforIndex($gd->getImageResource(), $colour); } } return $samples;