Lecturize / Laravel-Addresses

Simple address and contact management for Laravel.
MIT License
197 stars 39 forks source link

Method deleteAddress is not working on php 7.2 #21

Closed giovanniledda closed 3 years ago

giovanniledda commented 5 years ago

This condition:

$this !== $address->addressable()->first()

is always true so the function always returns false and the address is never deleted.

Changing this with:

$this != $address->addressable()->first()

...or with:

$this->id !== $address->addressable()->first()->id

works.