[dev] Patch for attaching file to email

Rick Emery rick at emery.homelinux.net
Mon Feb 2 12:25:16 PST 2004


The attached patch fixes an "Undefined index: attach_size_limit" error when
attaching a file to an email message, if the max attachment size was left 0
during configuration.

--
Rick Emery

"When once you have tasted flight, you will forever walk the Earth
 with your eyes turned skyward, for there you have been, and there
 you will always long to return"
                                              -- Leonardo Da Vinci
-------------- next part --------------
Index: Compose.php
===================================================================
RCS file: /repository/imp/lib/Compose.php,v
retrieving revision 1.71
diff -u -r1.71 Compose.php
--- Compose.php	31 Jan 2004 16:02:48 -0000	1.71
+++ Compose.php	2 Feb 2004 20:20:12 -0000
@@ -323,7 +323,7 @@
         $tempfile = $_FILES[$name]['tmp_name'];
 
         /* Check for filesize limitations. */
-        if ($conf['compose']['attach_size_limit'] &&
+        if (isset($conf['compose']['attach_size_limit']) &&
             (($conf['compose']['attach_size_limit'] - $this->sizeOfAttachments() - $_FILES[$name]['size']) < 0)) {
             return PEAR::raiseError(sprintf(_("Attached file \"%s\" exceeds the attachment size limits. File NOT attached."), $filename), 'horde.error');
         }


More information about the dev mailing list