laravel/laravel — pull request #1817 by gxela (2013-03-26 05:20:53+00:00)
Title: better error returned if checked is_object

I don't have 'address' field in mysql table and created get_address()...

before:

Unhandled Exception

Message:

Call to a member function results() on a non-object

Location:

/var/www/app/laravel/database/eloquent/model.php on line 680

after:

Unhandled Exception

Message:

Undefined property: CustomerAddress::$address

Location:

/var/www/app/laravel/database/eloquent/model.php on line 678

Stack Trace:

#0 /var/www/app/laravel/laravel.php(42): Laravel\Error::native(8, 'Undefined prope...', '/var/www/app...', 678)
#1 /var/www/app/laravel/database/eloquent/model.php(678): Laravel\{closure}(8, 'Undefined prope...', '/var/www/app...', 678, Array)
#2 /var/www/app/laravel/view.php(386) : eval()'d code(61): Laravel\Database\Eloquent\Model->__get('address')
#3 /var/www/app/laravel/view.php(386): eval()
#4 /var/www/app/laravel/view.php(353): Laravel\View->get()
#5 /var/www/app/laravel/view.php(590): Laravel\View->render()