Wednesday, February 18, 2015

Clear attachments from previous email when sending with Codeigniter

I had the problem of sending multiple emails with attachment and having the attachment from a previous email included in the next email when using the codeigniter framework. Even though I searched the manual and included the clear option, the problem still persists. After doing some research, I found out that I had to include the TRUE option in the clear function: $this->email->clear(TRUE); This is what solved it for me.

Wednesday, February 4, 2015

PHP Array to String conversion Codeigniter

I was having this problem where I was doing an update batch to my db and I was getting the error of array to string conversion. The funny thing was that the db was being updated. After doing some research, I found out that there was a problem with the DB_active_rec.php file in Codeigniter, on line 1407.

Change $not[] = $k.'-'.$v; to $not[] = $k2.'-'.$v2 and the problem is solved.