YetiForceCRM icon indicating copy to clipboard operation
YetiForceCRM copied to clipboard

[bug] Connection to IMAP in OSSMailScanner fails in php 8.1 because of change in imap_open return type

Open diderich opened this issue 2 years ago • 6 comments

🐞 bug report

When running YetiForceCRM 6.4.0 v4 with php 8.1.10, the OSSMailScanner no longer works because the return type of function imap_open has changed from resource to IMAP\Connection and the code tests with \is_resource if a connection has been opened.

Rather than testing \is_resource($mbox) if the imap connection has been opened, the test should be $mbox !== false.

type-change

This is twice the case: code

diderich avatar Sep 02 '22 12:09 diderich

Thanks, I will add just for the sake of clarity that YetiForce version 6.4 does not support php version 8.1 :)

rskrzypczak avatar Sep 02 '22 12:09 rskrzypczak

You write on your website that it has been tested using 8.1 (I assumed that when it has been tested with a version, that the version is supported). You even mention 8.1.x on the configuration page.

php-8 1

dev

diderich avatar Sep 02 '22 12:09 diderich

I corrected the description on the home page, as you can see in CRM it says that it is in the development stage We know a few bugs in php 8.1 we will fix them. We are developing tests to detect them, see: https://github.com/YetiForceCompany/YetiForceCRM/actions/runs/2978224375

mariuszkrzaczkowski avatar Sep 02 '22 12:09 mariuszkrzaczkowski

Yes, it can be a little confusing :) Note (dev), as I believe, is to inform here that it is for development environments, as it is still in the implementation phase. So feel free to report bugs with php 8.1 :)

rskrzypczak avatar Sep 02 '22 12:09 rskrzypczak

I read the dev as related to php (you were using a development version of php), not that the dev related to the crm system ;-)

diderich avatar Sep 02 '22 12:09 diderich

That's why I mentioned it could be confusing :) We will fix this in the next version.

rskrzypczak avatar Sep 02 '22 12:09 rskrzypczak