Skip to content

Commit f21a90e

Browse files
committed
SetImageResource receives the output from imagecreatetruecolor which can also be false or GdImage
1 parent 6738a06 commit f21a90e

File tree

1 file changed

+2
-2
lines changed
  • src/PhpPresentation/Shape/Drawing

1 file changed

+2
-2
lines changed

src/PhpPresentation/Shape/Drawing/Gd.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ public function getImageResource()
8383
/**
8484
* Set image resource.
8585
*
86-
* @param resource $value
86+
* @param resource|false|\GdImage|null $value
8787
*
8888
* @return $this
8989
*/
9090
public function setImageResource($value = null)
9191
{
9292
$this->imageResource = $value;
9393

94-
if (null !== $this->imageResource) {
94+
if (null !== $this->imageResource && false !== $value) {
9595
// Get width/height
9696
$this->width = imagesx($this->imageResource);
9797
$this->height = imagesy($this->imageResource);

0 commit comments

Comments
 (0)