From 9a15ec0e155aa35d22a3d4edb23c5a1d3f4cc866 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 28 Dec 2006 13:09:48 +1300 Subject: [PATCH] Only indicate that it is truncated if we actually did truncate it! --- inc/CalDAVRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/CalDAVRequest.php b/inc/CalDAVRequest.php index ee2da3cd..4211c283 100644 --- a/inc/CalDAVRequest.php +++ b/inc/CalDAVRequest.php @@ -501,7 +501,7 @@ class CalDAVRequest echo $message; if ( strlen($message) > 100 || strstr($message, "\n") ) { - $message = substr( preg_replace("#\s+#m", ' ', $message ), 0, 100) + "..."; + $message = substr( preg_replace("#\s+#m", ' ', $message ), 0, 100) . (strlen($message) > 100 ? "..." : ""); } dbg_error_log("caldav", "Status: %d, Message: %s, User: %d, Path: %s", $status, $message, $session->user_no, $this->path);