Skip to content

Commit

Permalink
Updated LatLongSubscriber to check for subclasses
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-sommer committed Apr 15, 2015
1 parent 779274f commit 1459b33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Subscriber/LatitudeLongitudeSubscriber.php
Expand Up @@ -14,15 +14,15 @@
use Doctrine\Common\EventSubscriber;
use Doctrine\ORM\Events;
use Doctrine\ORM\Event\PreUpdateEventArgs;
use Orkestra\Bundle\ApplicationBundle\Entity\Contact\Address;
use Orkestra\Bundle\ApplicationBundle\Model\Contact\AddressInterface;

class LatitudeLongitudeSubscriber implements EventSubscriber
{
public function preUpdate(PreUpdateEventArgs $event)
{
$entity = $event->getEntity();

if (!$entity instanceof Address) {
if (!$entity instanceof AddressInterface) {
return;
}

Expand Down

0 comments on commit 1459b33

Please sign in to comment.