[Tickets #5792] Re: Notice: Uninitialized string offset: 0 in /usr/share/horde3/imp/lib/MIME/Viewer/plain.php on line 132

bugs at horde.org bugs at horde.org
Wed Apr 30 19:10:32 UTC 2008


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/5792
-----------------------------------------------------------------------
 Ticket             | 5792
 Updated By         | jason at linuxbox.com
 Summary            | Notice: Uninitialized string offset: 0 in
                    | /usr/share/horde3/imp/lib/MIME/Viewer/plain.php on
line 132
 Queue              | IMP
 Version            | 4.1.3
 Type               | Bug
 State              | No Feedback
 Priority           | 2. Medium
 Milestone          |
 Patch              |
 Owners             |
-----------------------------------------------------------------------


jason at linuxbox.com (2008-04-30 15:10) wrote:

I have recently run into this problem as well.  I traced the problem to the
preg_replace_callback function call in the postProcess function in
highlightquotes.php  I found an interesting commit in the repository here:
http://cvs.horde.org/diff.php?sa=1&r1=1.6.8.17&r2=1.6.8.18&f=framework%2FText_Filter%2FFilter%2Fhighlightquotes.php

My investigation found that it was a PHP resource limit causing
preg_replace to return NULL instead of the processed string
(http://us3.php.net/manual/en/ref.pcre.php#77790).  The diff above
sidesteps the problem by checking the result of the function call and using
the unprocessed text if NULL comes back.  I think a more appropriate
solution should include some notification that this error occured to alert
the sysadmin and possibly some additional application logic to attempt an
alternative approach if this one fails.


> I have the same problem here with linux/apache2, php5, horde 3.1.4
> and imp 4.1.4.
> The mails having this problem are all complicated (probably not html
> compliant) html messages, but not too big.
> Unfortunately, i can't give the messages for testing purpose.





More information about the bugs mailing list