yiioverflow / yii2-imap

https://yiioverflow.com
BSD 3-Clause "New" or "Revised" License
41 stars 33 forks source link

Fixed default argument for setConnectionArgs method #21

Closed s1lver closed 5 years ago

s1lver commented 5 years ago

If you use setConnectionArgs and not ask the last argument, the error occurs types to be transferred.

$services = new ServiceLocator();
$imap = new Imap(ArrayHelper::getValue(Yii::$app->params, 'TEST', []));
$services->set('imap', $imap);
$imap->createConnection();
$imap->setConnectionArgs(OP_READONLY);

https://www.php.net/manual/en/function.imap-open.php