Skip to content

Commit b282c9f

Browse files
committed
Fixed deprecated GD usage
1 parent 4cd6d00 commit b282c9f

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

filesystem/GD.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ public function setImageResource($resource) {
5757
}
5858

5959
public function setGD($gd) {
60-
Deprecation::notice('3.1', 'Use GD::setImageResource instead',
61-
Deprecation::SCOPE_CLASS);
60+
Deprecation::notice('3.1', 'Use GD::setImageResource instead');
6261
return $this->setImageResource($gd);
6362
}
6463

@@ -67,8 +66,7 @@ public function getImageResource() {
6766
}
6867

6968
public function getGD() {
70-
Deprecation::notice('3.1', 'GD::getImageResource instead',
71-
Deprecation::SCOPE_CLASS);
69+
Deprecation::notice('3.1', 'GD::getImageResource instead');
7270
return $this->getImageResource();
7371
}
7472

tests/filesystem/GDTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ protected function sampleAreas(GD $gd, $horizontal = 4, $vertical = 4) {
4646
$samples = array();
4747
for($y = 0; $y < $vertical; $y++) {
4848
for($x = 0; $x < $horizontal; $x++) {
49-
$colour = imagecolorat($gd->getGD(), $x * 5, $y * 5);
50-
$samples[] = ImageColorsforIndex($gd->getGD(), $colour);
49+
$colour = imagecolorat($gd->getImageResource(), $x * 5, $y * 5);
50+
$samples[] = ImageColorsforIndex($gd->getImageResource(), $colour);
5151
}
5252
}
5353
return $samples;

0 commit comments

Comments
 (0)