codeigniter-amazon-ses
codeigniter-amazon-ses copied to clipboard
Attachment sending issue
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
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;
}