diff --git a/Behaviors/GeometryBehavior.php b/Behaviors/GeometryBehavior.php index de8095d..069c225 100644 --- a/Behaviors/GeometryBehavior.php +++ b/Behaviors/GeometryBehavior.php @@ -149,6 +149,9 @@ public function afterSave() */ public function afterFind() { + if (empty($this->owner->{$this->attribute})) { + return parent::afterFind(); + } if (!is_object(json_decode($this->owner->{$this->attribute}))) { diff --git a/Behaviors/StBufferBehavior.php b/Behaviors/StBufferBehavior.php index ad0cc7f..ddb59f2 100644 --- a/Behaviors/StBufferBehavior.php +++ b/Behaviors/StBufferBehavior.php @@ -4,7 +4,7 @@ use yii\base\Behavior; use yii\db\ActiveRecord; -use Yii2\Extension\Postgis\components\StBuffer; +use Yii2\Extension\Postgis\Components\StBuffer; /** * Class StBufferBehavior diff --git a/Db/PostgisQueryTrait.php b/Db/PostgisQueryTrait.php index fdac74f..5be8a97 100644 --- a/Db/PostgisQueryTrait.php +++ b/Db/PostgisQueryTrait.php @@ -1,6 +1,6 @@ */ trait PostgisQueryTrait