javanile / php-imap2

PHP IMAP with OAUTH2
https://php-imap2.javanile.org/
GNU General Public License v3.0
51 stars 31 forks source link

imap_headerinfo( ) Fatal error with PHP 8.0 changes #48

Open BrookStR opened 1 year ago

BrookStR commented 1 year ago

[01-Feb-2023 03:26:05 UTC] PHP Fatal error: Uncaught ArgumentCountError: imap_headerinfo() expects at most 4 arguments, 5 given in /Classes/javanile/php-imap2/bootstrap.php:858

function was set with 5 arguments -- { return imap_headerinfo($imap, $messageNum, $fromLength, $subjectLength,$defaultHost); }

PHP.net documentation state : the unused defaultHost parameter has been removed.

Unsure if we have an older version of javanile - php-imap2 however testing on php 8.0 showed this issue.

Deleting the defaultHost parameter fixed issue.

SiebeVE commented 1 year ago

Duplicate of https://github.com/javanile/php-imap2/issues/26