fadion / Bouncy

Map Elasticsearch results to Eloquent models
MIT License
71 stars 26 forks source link

Error when saving models with auto_index enabled #2

Closed stevepop closed 9 years ago

stevepop commented 9 years ago

On line 383 in the BouncyTrait, we have the line ; if (! $params['id']) {

This causes an error as the variable 'id' does not exist when saving a new model. A simple fix for this would be to change this to; if (! isset($params['id'])) {

Thanks.

fadion commented 9 years ago

Fixed on both branches. Thanks for reporting it.