A bit clearer null representation
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 14 Jul 2009 20:37:54 +0000 (14:37 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 14 Jul 2009 21:58:20 +0000 (15:58 -0600)
framework/Imap_Client/lib/Horde/Imap/Client/Socket.php
framework/Mime/lib/Horde/Mime/Part.php

index 62ec5b8..23270f9 100644 (file)
@@ -1207,7 +1207,7 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base
              * using literal8 "~{#} format", but it doesn't seem to work in
              * all servers tried (UW-IMAP/Cyrus). However, there is no other
              * way to append null data, so try anyway. */
-            $binary = (strpos($text, null) !== false);
+            $binary = (strpos($text, "\0") !== false);
 
             /* Need to add 2 additional characters (we send CRLF at the end of
              * a line) to literal count for multiappend messages to ensure the
index 1be68bb..d659922 100644 (file)
@@ -1560,7 +1560,7 @@ class Horde_Mime_Part
                 break;
 
             case 'binary':
-                if (strpos($line, null) !== false) {
+                if (strpos($line, "\0") !== false) {
                     return true;
                 }
                 break;