From 8e0674ebbe602abf8ef084e194f401f5a36d4638 Mon Sep 17 00:00:00 2001 From: Sem Fukalov Date: Thu, 7 Jul 2016 20:05:22 +0600 Subject: [PATCH] Fix bug with incorrect call property_exists() in CanBeBought::getBuyableDescription() --- src/CanBeBought.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/CanBeBought.php b/src/CanBeBought.php index 4214509..4f283c1 100644 --- a/src/CanBeBought.php +++ b/src/CanBeBought.php @@ -22,9 +22,9 @@ trait CanBeBought */ public function getBuyableDescription() { - if(property_exists('name', $this)) return $this->name; - if(property_exists('title', $this)) return $this->title; - if(property_exists('description', $this)) return $this->description; + if(property_exists($this, 'name')) return $this->name; + if(property_exists($this, 'title')) return $this->title; + if(property_exists($this, 'description')) return $this->description; return null; } @@ -36,7 +36,7 @@ trait CanBeBought */ public function getBuyablePrice() { - if(property_exists('price', $this)) return $this->price; + if(property_exists($this, 'price')) return $this->price; return null; }