codeigniter-amazon-ses icon indicating copy to clipboard operation
codeigniter-amazon-ses copied to clipboard

Attachment sending issue

Open ritika7 opened this issue 7 years ago • 1 comments

getting below error while using attach method for sending attachment -

Message: Only variables should be passed by reference

Filename: libraries/Amazon_ses.php

Line Number: 204

ritika7 avatar Oct 01 '17 23:10 ritika7

The next function need a variable instead of explode direct.

public function attach($filename, $name = FALSE)
{
if (!file_exists($filename)) return FALSE;
if ( ! $name) $name = basename($filename);

$ext=explode('.', basename($filename));
$ext=count($ext)>1 ? $ext[1] : "";

$this->attach[] = array( "filename" 	=> $filename,
								"mime_type"	=> $this->_mime_types($ext),
								"name"		=> $name,
								"ext"			=> $ext,
					);
return $this;
}

akarupt avatar Sep 05 '23 13:09 akarupt