Fix a bug in the Attribute Model that would not return the right value for is_{tag,attribute}().
Fix a bug in the Attribute Model that would not return the right value for is_{tag,attribute}().
diff --git a/includes/model_attribute.php b/includes/model_attribute.php
index 95aebd2..eaf0a6a 100644
--- a/includes/model_attribute.php
+++ b/includes/model_attribute.php
@@ -54,11 +54,13 @@ class Attribute extends phalanx\data\Model
public function is_tag()
{
- return empty($this->title);
+ $title = $this->title;
+ return empty($title);
}
public function is_attribute()
{
- return !empty($this->title);
+ $title = $this->title;
+ return !empty($title);
}
// Returns the access level that |user| has for this attribute for |bug|.