Skip to content

Commit 1b68270

Browse files
authored
Merge pull request #4085 from PHPOffice/dependabot/composer/phpstan/phpstan-1.11.5
Bump phpstan/phpstan from 1.11.3 to 1.11.5
2 parents cffcfb4 + ae8f2d7 commit 1b68270

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

composer.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/PhpSpreadsheet/Worksheet/MemoryDrawing.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,8 @@ private function cloneResource(): void
101101
// If the image has transparency...
102102
$transparent = imagecolortransparent($this->imageResource);
103103
if ($transparent >= 0) {
104+
// Starting with Php8.0, next function throws rather than return false
104105
$rgb = imagecolorsforindex($this->imageResource, $transparent);
105-
if (empty($rgb)) {
106-
throw new Exception('Could not get image colors');
107-
}
108106

109107
imagesavealpha($clone, true);
110108
$color = imagecolorallocatealpha($clone, $rgb['red'], $rgb['green'], $rgb['blue'], $rgb['alpha']);

0 commit comments

Comments
 (0)