We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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); }
The text was updated successfully, but these errors were encountered:
Hi @Gizmo091 , could you please test our new version https://github.com/javanile/php-imap2/releases/tag/0.1.9
Sorry, something went wrong.
Hi @francescobianco, I can confirm that this bug still exists in v0.1.10. Like @Gizmo091 already noted, the variable $section is never initialized in the bodyStruct function. The Section is actually passed as $flag argument (which is unused in this function): https://github.com/javanile/php-imap2/blob/0.1.10/bootstrap.php#L945
$section
$flag
Merge pull request #5 from dicode-nl/main
24ee63b
from dicode-nl/php-imap
francescobianco
No branches or pull requests
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.
The text was updated successfully, but these errors were encountered: