[imp] Message content not displayed after upgrade to PHP 7.3

Michael J Rubinsky mrubinsk at horde.org
Sun Dec 30 17:15:11 UTC 2018


Quoting Arjen de Korte <build+horde at de-korte.org>:

> Citeren Michael J Rubinsky <mrubinsk at horde.org>:
>
>> Quoting Arjen de Korte <build+horde at de-korte.org>:
>>
>>> Citeren Arjen de Korte <build+horde at de-korte.org>:
>>>
>>>> Citeren Arjen de Korte <build+horde at de-korte.org>:
>>>>
>>>>> Just a heads-up for those that what to upgrade to PHP 7.3: it  
>>>>> seems like there are some incompatibilities with Horde (master)  
>>>>> in handling regular expressions.
>>>>>
>>>>> Some (but not all) messages will not display content.
>>>
>>> It looks like HTML mail is displayed correctly and text-only ones don't.
>>>
>>>>> The following is logged for each message:
>>>>>
>>>>> 2018-12-25T12:47:27+01:00 WARN: horde [imp] PHP ERROR:  
>>>>> preg_replace_callback(
>>>>> ): Compilation failed: invalid range in character class at  
>>>>> offset 68 [pid 207
>>>>> 6 on line 99 of "/usr/share/php7/PEAR/Horde/Text/Filter.php"]
>>>>> 2018-12-25T12:47:27+01:00 WARN: horde [imp] PHP ERROR:  
>>>>> preg_replace_callback(
>>>>> ): Compilation failed: invalid range in character class at  
>>>>> offset 649 [pid 20
>>>>> 76 on line 99 of "/usr/share/php7/PEAR/Horde/Text/Filter.php"]
>>>>>
>>>>> This may be due to the stricter interpretation of character  
>>>>> ranges in classes.
>>>>
>>>> Note that the message content is available. I can reply to such a  
>>>> message (like the one quoted above) just fine. So the trouble  
>>>> seems to be in rendering messages, rather than grabbing them from  
>>>> the IMAP server.
>>
>> Any chance you can get a stack trace to see where the regexp is  
>> coming from? I can't reproduce this on a fresh VM I spun up with  
>> php 7.3 and current git master.
>>
>> I did find some regexps that needed to be fixed, but I dont' think  
>> those are called when just displaying an email. See:  
>> https://github.com/horde/imp/commit/5186ad002b0809960fd6096a2ca85ab8d2aab888
>
> There are similar commits in other files. I took a shot and applied
>
> https://github.com/horde/Text_Filter/commit/8d0de407dbb95626bc54eaba078191847be9c574

> This commit (in my installation from PEAR packages) fixed the  
> display of text-only messages. This commit (and similar ones) seems  
> to be mandatory to make Horde run under PHP 7.3, so I'd vote for  
> backporting these.

Yeah, that commit is actually already in the release branch, it just  
hasn't been released to PEAR yet. I'm working on that now.  I assumed  
that was already in your code since you mentioned it was "master".


> Thanks for showing me the right direction.

No problem, glad it's working for you now!


>> Also, please make sure you are up to date with git on *all*  
>> packages. I know there were a few similar fixes not *too* long ago  
>> in some other packages, like Text_Filter.
>
> -- 
> imp mailing list
> Frequently Asked Questions: http://wiki.horde.org/FAQ
> To unsubscribe, mail: imp-unsubscribe at lists.horde.org



-- 
mike
The Horde Project
http://www.horde.org
https://www.facebook.com/hordeproject
https://www.twitter.com/hordeproject
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 9272 bytes
Desc: PGP Public Key
URL: <https://lists.horde.org/archives/imp/attachments/20181230/157de0d0/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 821 bytes
Desc: PGP Digital Signature
URL: <https://lists.horde.org/archives/imp/attachments/20181230/157de0d0/attachment-0001.bin>


More information about the imp mailing list