Skip to content

Instantly share code, notes, and snippets.

@jeroenbourgois
Created November 28, 2012 09:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeroenbourgois/4160181 to your computer and use it in GitHub Desktop.
Save jeroenbourgois/4160181 to your computer and use it in GitHub Desktop.
add_lead
public function add_lead(Model_Lead $lead) {
try {
$lead->save();
} catch(Orm\ValidationFailed $e) {
$error = ['model' => $lead, 'error' => $e->get_fieldset()->validation()];
Log::error($e);
// $error['errpor'] is NULL here, and I cannot find a way
// to get the actual error messages
return $error;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment