We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da604a8 commit c22f7eaCopy full SHA for c22f7ea
src/PhpWord/Shared/Html.php
@@ -666,8 +666,10 @@ private static function parseImage($node, $element)
666
667
$ifp = fopen($imgFile, 'wb');
668
669
- fwrite($ifp, base64_decode($match[2]));
670
- fclose($ifp);
+ if ($ifp !== false) {
+ fwrite($ifp, base64_decode($match[2]));
671
+ fclose($ifp);
672
+ }
673
}
674
$src = urldecode($src);
675
@@ -687,8 +689,10 @@ private static function parseImage($node, $element)
687
689
688
690
$ifp = fopen($src, 'wb');
691
- fwrite($ifp, $imgBlob);
692
693
+ fwrite($ifp, $imgBlob);
694
695
696
697
698
0 commit comments