<![CDATA[ Eform O length file attachment - My Forums]]> https://forums.modx.com/thread/?thread=47088 <![CDATA[Re: Eform O length file attachment]]> https://forums.modx.com/thread/47088/eform-o-length-file-attachment#dis-post-542106 dan971 Jun 01, 2016, 05:14 PM https://forums.modx.com/thread/47088/eform-o-length-file-attachment#dis-post-542106 <![CDATA[Eform O length file attachment]]> https://forums.modx.com/thread/47088/eform-o-length-file-attachment#dis-post-272886
Small problem with eform when i attach a empty file,
I assume that i would need some type of if statement to check for 0 length in the file
but not sure how to code it in myself.

Any help would be greatly appreciated

Error MSG

« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »

PHP error debug
Error: fread() [function.fread]: Length parameter must be greater than 0
Error type/ Nr.: Warning - 2
File: /webhost/manager/includes/controls/class.phpmailer.php
Line: 1095
Line 1095 source: $file_buffer = fread($fd, filesize($path));

CODE class.phpmailer.php

$magic_quotes = get_magic_quotes_runtime();
set_magic_quotes_runtime(0);

>>>>> $file_buffer = fread($fd, filesize($path));

$file_buffer = $this->EncodeString($file_buffer, $encoding);
fclose($fd);
set_magic_quotes_runtime($magic_quotes);
return $file_buffer;^M

Regards T
]]>
talon Feb 14, 2009, 09:41 PM https://forums.modx.com/thread/47088/eform-o-length-file-attachment#dis-post-272886