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.
Trying to use imap2_bodystruct, the function throw a notice for an undefined variable called section.
A call to imap2_bodystruct function trigger an "undefined variable" notice.
Notice: Undefined variable: section in .../vendor/javanile/php-imap2/src/Message.php on line 186
Indeed, the $section variable is never declared or instantiated.
public static function bodyStruct($imap, $messageNum, $flags = 0) { if (is_a($imap, Connection::class)) { $client = $imap->getClient(); #$client->setDebug(true); $messages = $client->fetch($imap->getMailboxName(), $messageNum, false, ['BODY['.$section.']']); if ($section) { return $messages[$messageNum]->bodypart[$section]; } return $messages[$messageNum]->body; } return imap_fetchstructure($imap, $messageNum, $flags); }
Summary
Trying to use imap2_bodystruct, the function throw a notice for an undefined variable called section.
Current behavior
A call to imap2_bodystruct function trigger an "undefined variable" notice.
Indeed, the $section variable is never declared or instantiated.