From 8932c55bf11c6b2623ef9d37748d9382268ce8f0 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 14 Jul 2009 14:37:54 -0600 Subject: [PATCH] A bit clearer null representation --- framework/Imap_Client/lib/Horde/Imap/Client/Socket.php | 2 +- framework/Mime/lib/Horde/Mime/Part.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php b/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php index 62ec5b8c5..23270f989 100644 --- a/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php +++ b/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php @@ -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 diff --git a/framework/Mime/lib/Horde/Mime/Part.php b/framework/Mime/lib/Horde/Mime/Part.php index 1be68bb05..d659922ea 100644 --- a/framework/Mime/lib/Horde/Mime/Part.php +++ b/framework/Mime/lib/Horde/Mime/Part.php @@ -1560,7 +1560,7 @@ class Horde_Mime_Part break; case 'binary': - if (strpos($line, null) !== false) { + if (strpos($line, "\0") !== false) { return true; } break; -- 2.11.0