Skip to content

Commit d2d8d96

Browse files
committed
pull in fix for #496
calling `$this->textHtml` within class scope does not guarantee that `$this->textHtml` has been populated.
1 parent c5debb6 commit d2d8d96

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/PhpImap/IncomingMail.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,9 @@ public function replaceInternalLinks(string $baseUri): string
207207
*/
208208
public function embedImageAttachments(): void
209209
{
210-
/** @var string|null */
211-
$fetchedHtml = $this->textHtml;
210+
$fetchedHtml = (string) $this->__get('textHtml');
212211

213-
\preg_match_all("/\bcid:[^'\"\s]{1,256}/mi", $fetchedHtml ?? '', $matches);
212+
\preg_match_all("/\bcid:[^'\"\s]{1,256}/mi", $fetchedHtml, $matches);
214213

215214
if (isset($matches[0]) && \is_array($matches[0]) && \count($matches[0])) {
216215
/** @var list<string> */

0 commit comments

Comments
 (0)