From eafd5ff6f51cf5b10020f857a618e7bcf3a04379 Mon Sep 17 00:00:00 2001 From: Luke Renfrew Date: Tue, 26 Apr 2022 10:52:04 +0100 Subject: [PATCH] Supress libpng warning about too many profiles --- src/PhpWord/Writer/AbstractWriter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpWord/Writer/AbstractWriter.php b/src/PhpWord/Writer/AbstractWriter.php index 2c1ad29460..e897a634f1 100644 --- a/src/PhpWord/Writer/AbstractWriter.php +++ b/src/PhpWord/Writer/AbstractWriter.php @@ -351,7 +351,7 @@ protected function addFilesToPackage(ZipArchive $zip, $elements) // Retrive GD image content or get local media if (isset($element['isMemImage']) && $element['isMemImage']) { - $image = call_user_func($element['createFunction'], $element['source']); + $image = @call_user_func($element['createFunction'], $element['source']); if ($element['imageType'] === 'image/png') { // PNG images need to preserve alpha channel information imagesavealpha($image, true);