Page 1 of 1

[FIXED] setting the name of attachment fails

Posted: Mon Apr 09, 2007 12:01 pm
by orixilus
Hi,

using the constructor of Swift_Message_Image to set the name of a file attachment didn't work for me:

Code: Select all

$img =& new Swift_Message_Image(new Swift_File('/path/to/file'),'name_of_file.ext');
this did the trick:

Code: Select all

$img =& new Swift_Message_Image(new Swift_File('/path/to/file'));
$img -> setFileName('name_of_file.ext');
am I doing something wrong or is it a bug?

I'm using Swift-3.1.2-php4 in php4.4.4

thanks and keep up the great work!

Posted: Mon Apr 09, 2007 2:37 pm
by Chris Corbyn
It appears to be a minor bug due the order in which the class is processing the arguments. I'll sort this out for tomorrow, but as you've discovered, using the actual setter will work fine :)

I'll be releasing an update tomorrow with 4 minor fixes in any case :)

Posted: Mon Apr 09, 2007 2:41 pm
by orixilus
ok, glad I could help! :)