<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="http://bugs.horde.org/themes/feed-rss.xsl" type="text/xsl"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 <channel>
  <title>Notice: Uninitialized string offset: 0 in /usr/share/horde3/imp/lib/MIME/Viewer/plain.php on line 132</title>
  <pubDate>Sat, 05 Jul 2008 12:45:20 -0400</pubDate>
  <link>http://bugs.horde.org/ticket/5792</link>
  <atom:link rel="self" type="application/rss+xml" title="Notice: Uninitialized string offset: 0 in /usr/share/horde3/imp/lib/MIME/Viewer/plain.php on line 132" href="http://bugs.horde.org/ticket/5792/rss" />
  <description>Notice: Uninitialized string offset: 0 in /usr/share/horde3/imp/lib/MIME/Viewer/plain.php on line 132</description>

  
  
  <item>
   <title>Got that error with a long mail.
The display of that messag</title>
   <description>Got that error with a long mail.
The display of that message is stopped at &quot;Headers : ...&quot;
The content of the message is not shown.

Here are the Headers : (i removed headers containing email addresses)

Content-Transfer-Encoding:  	quoted-printable
Content-Type:  	text/plain; charset=iso-8859-1
Date:  	Tue, 9 Oct 2007 19:19:53 +0200 [09.10.2007 19:19:53 CEST]
MIME-Version:  	1.0
Organization:  	IBE Software
Received:  	

    * (qmail 30379 invoked from network); 9 Oct 2007 19:21:49 +0200
    * from 23.mail-out.ovh.net (213.186.41.17) by s15236240.domainepardefaut.fr with SMTP; 9 Oct 2007 19:21:49 +0200
    * (qmail 22863 invoked by uid 503); 9 Oct 2007 17:22:05 -0000
    * (QMFILT: 1.0); 09 Oct 2007 17:22:05 -0000
    * from b7.ovh.net (HELO mail73.ha.ovh.net) (213.186.33.57) by 23.mail-out.ovh.net with SMTP; 9 Oct 2007 17:22:05 -0000
    * from b0.ovh.net (HELO queue-out) (213.186.33.50) by b0.ovh.net with SMTP; 9 Oct 2007 17:21:36 -0000
    * from cag06-2-82-229-161-75.fbx.proxad.net (HELO jonjon-acer) (82.229.161.75) by ns0.ovh.net with SMTP; 9 Oct 2007 17:21:33 -0000

References:  	&lt;OF9B0FA29A.87A768A2-ONC125736F.004AB12F-C125736F.004AE35A@amadeus.com&gt; &lt;1191937365.470b85552f72c@imp.free.fr&gt;
Subject:  	Re[2]: privé
X-Mailer:  	The Bat! (v3.99.24) Professional
X-Ovh-Local:  	213.186.33.20 (ns0.ovh.net)
X-Ovh-Remote:  	82.229.161.75 (cag06-2-82-229-161-75.fbx.proxad.net)
X-Priority:  	3 (Normal)
X-Spam-Check:  	DONE|H 0.5/N</description>
   <pubDate>Wed, 10 Oct 2007 13:17:46 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/5792#t37596</link>
  </item>
  <item>
   <title>You have to provide an example message.</title>
   <description>You have to provide an example message.</description>
   <pubDate>Wed, 10 Oct 2007 19:14:19 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/5792#t37608</link>
  </item>
  <item>
   <title>&gt; You have to provide an example message.
</title>
   <description>&gt; You have to provide an example message.
</description>
   <pubDate>Wed, 10 Oct 2007 19:49:21 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/5792#t37609</link>
  </item>
  <item>
   <title>Same symptom occurring with the attached message.

In plai</title>
   <description>Same symptom occurring with the attached message.

In plain.php, strlen($text) =29562, then Text_Filter::filter($text, $filters, $filter_params) yields an empty result, i. e. strln()=0, where

$filters = Array (  [0] =&gt; text2html
                         ,  [1] =&gt; tabs2spaces
                         ,  [2] =&gt; highlightquotes
                         ,  [3] =&gt; simplemarkup
                         ,  [4] =&gt; dimsignature
                         )
$filter_params = Array( [0] =&gt; Array([parselevel] =&gt; 2, [charset] =&gt; UTF-8)
                                   ,  [1] =&gt; Array()
                                   ,  [2] =&gt; Array([hideBlocks] =&gt;,  [citeblock] =&gt; 1)
                                   ,  [3] =&gt; Array()
                                   ,  [4] =&gt; Array()
                                   )

Another message is displayed allright; in the latter case $filter_params[2][citeblock] = NULL, or = '', or = something else print_r does not display.
</description>
   <pubDate>Thu, 11 Oct 2007 10:13:47 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/5792#t37611</link>
  </item>
  <item>
   <title>Both messages render perfectly fine for me. This has to be a</title>
   <description>Both messages render perfectly fine for me. This has to be a buggy c-client version installed on your systems.</description>
   <pubDate>Fri, 12 Oct 2007 12:53:35 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/5792#t37657</link>
  </item>
  <item>
   <title>Renders fine for me also (using HEAD).</title>
   <description>Renders fine for me also (using HEAD).</description>
   <pubDate>Wed, 17 Oct 2007 18:48:07 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/5792#t37796</link>
  </item>
  <item>
   <title>We are having the same problem with long messages.</title>
   <description>We are having the same problem with long messages.</description>
   <pubDate>Tue, 30 Oct 2007 09:51:28 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/5792#t38247</link>
  </item>
  <item>
   <title>This bug does not depend on the message size. It also doesn'</title>
   <description>This bug does not depend on the message size. It also doesn't depend on the c-client version (I experienced the same error with several different c-clients compiled PHP modules). As far as I found out it depends on the message content. Thus is actually _is_ a horde bug.

The Text_Filter always stumbles over the show/hide toggles for quote blocks section in &quot;lib/Horde/Text/Filter/highlightquotes.php&quot;. Most probably the regex is faulty.

'/(\n)(( *(&amp;gt;\s?)+(?! ?&amp;gt;).*?)(\n|$)(?! *(&amp;gt; ?)+))/s'

Will keep you updated as soon as I found out more.

Stefan
</description>
   <pubDate>Fri, 30 Nov 2007 04:14:53 -0500</pubDate>
   <link>http://bugs.horde.org/ticket/5792#t39171</link>
  </item>
  <item>
   <title>Any news?</title>
   <description>Any news?</description>
   <pubDate>Tue, 18 Dec 2007 13:29:35 -0500</pubDate>
   <link>http://bugs.horde.org/ticket/5792#t40026</link>
  </item>
  <item>
   <title>I have the same problem here with linux/apache2, php5, horde</title>
   <description>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.</description>
   <pubDate>Sat, 26 Jan 2008 17:36:10 -0500</pubDate>
   <link>http://bugs.horde.org/ticket/5792#t41523</link>
  </item>
  <item>
   <title>I have recently run into this problem as well.  I traced the</title>
   <description>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&amp;r1=1.6.8.17&amp;r2=1.6.8.18&amp;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.


&gt; I have the same problem here with linux/apache2, php5, horde 3.1.4 
&gt; and imp 4.1.4.
&gt; The mails having this problem are all complicated (probably not html 
&gt; compliant) html messages, but not too big.
&gt; Unfortunately, i can't give the messages for testing purpose.
</description>
   <pubDate>Wed, 30 Apr 2008 15:10:27 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/5792#t45007</link>
  </item>
  <item>
   <title>Sounds like this issue we already dealt with elsewhere:
htt</title>
   <description>Sounds like this issue we already dealt with elsewhere:
http://cvs.horde.org/co.php?r=1.13&amp;f=framework%2FText_Filter%2FFilter%2Fxss.php</description>
   <pubDate>Mon, 05 May 2008 15:36:08 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/5792#t45176</link>
  </item>
  <item>
   <title>Thanks for pointing that out.  Sounds like the same issue, b</title>
   <description>Thanks for pointing that out.  Sounds like the same issue, but I don't see that it has been resolved in plain.php yet.
</description>
   <pubDate>Mon, 05 May 2008 16:57:29 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/5792#t45179</link>
  </item>
  <item>
   <title>any patches ? i have the same problem</title>
   <description>any patches ? i have the same problem</description>
   <pubDate>Mon, 12 May 2008 15:51:33 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/5792#t45242</link>
  </item>
  <item>
   <title>The warning is fixed with the following commit:
http://cvs.</title>
   <description>The warning is fixed with the following commit:
http://cvs.horde.org/diff.php/imp/lib/MIME/Viewer/plain.php?r1=1.58.8.18&amp;r2=1.58.8.18.2.1&amp;ty=u
The empty message with the following:
http://cvs.horde.org/diff.php/framework/Text_Filter/Filter/highlightquotes.php?r1=1.6.8.17&amp;r2=1.6.8.17.2.1&amp;ty=u</description>
   <pubDate>Sun, 18 May 2008 07:37:43 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/5792#t45345</link>
  </item>
  

 </channel>
</rss>
