I think Ian is correct but also you try going mad with debugging power?
foreach($data['date'] as $key => $date) { echo $date; $date = $this->_convertDate(trim($date)); echo $date; if (!$date) unset($data['date'][$key]); echo $data['date'][$key]; else $data['date'][$key] = $date; echo $date; dbglog($data, "Converted data"); }
A silly idea but sometimes it helps me to see the $variable being carried along through each line so I can find the problem line.