Zizaco/factory-muff — pull request #7 by dustinlyons (2013-06-06 15:34:02+00:00)
Title: Fixes bug where SaveException is never thrown

Fixes bug introduced in Travis Build #30.
https://travis-ci.org/Zizaco/factory-muff/builds/7442116

I was receiving this error when Ardent validations failed:
PHP Fatal error: Call to undefined method Illuminate\Support\MessageBag::getResults()

If the model failed to save, create() was trying to access an unknown class attribute (errors) before throwing SaveException.

I was unsure of the original purpose, as I can't find an errors attribute anywhere in Eloquent. Ardent has a validationErrors attribute-- this PR first checks for it's existence before using to pass to SaveException.