Closed einkoro closed 8 years ago
Looks like its because of $relationshipPivots
which defaults to []
in Model but wasn't around in 4.2 supporting verisons before I upgraded to 5.1 recently. Would it be reasonable to add an is_array()
or is_null()
check on hasPivotAttributes()
?
Fixing with return array_key_exists( $name, $this->relationshipPivots ?: [] );
instead.
full strack trace and relevant models
laravel/framework 5.1.28 esensi/model 0.5.8
Steps to reproduce from
php artisan tinker
:Interestingly enough if I extend WhiteLabel from Esensi\Model\Model rather than Illuminate\Database\Eloquent\Model and using the traits this error does not occur.