Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.


edited January 2016 in Bug Reports
I was trying to delete an image thats uploaded against a record using:

public function on_before_delete($where) { $id = $this->_determine_key_field_value($where); $data = $this->find_by_key($id); $files[] = assets_server_path('projects/'.$data->image, 'images'); foreach($files as $file) { if (file_exists($file)) { @unlink($file); } } }

But i found that i needed to use this line in the function

$id = $this->_determine_key_field_value(array('id'=>$where['']));

not sure if it's a bug in _determine_key_field_value() in MY_Model


Sign In or Register to comment.