Hi All .. Sorry if this has been covered,
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
Funny how old a thread can get before it's answered. I just ran into this problem and after I opened the file in my editor (from CyberDuck) and re-saved it, I realized that after just backing my site up, I had exceeded my disk-quota, and thus wasn't allowed to save anything anymore. That's why the filesize($path) was reading as zero (0).