Fix warning in development mode (#2476)

This commit is contained in:
jekkos
2019-09-22 19:54:48 +02:00
committed by jekkos
parent 4274321a3f
commit 55c86afcde

View File

@@ -66,7 +66,12 @@ class Attribute extends CI_Model
$this->db->from('attribute_values');
$this->db->where('attribute_value', $attribute_value);
return $this->db->get()->row()->attribute_id;
$query = $this->db->get();
if ($query->num_rows() > 0)
{
return $query->row()->attribute_id;
}
return FALSE;
}
/*