Skip to content

Commit

Permalink
fixed isset with nullValues
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Dec 16, 2015
1 parent 07370a2 commit aec2cd0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Row.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ public function __set($name, $value)
}

/**
* Magic method to check if a property is defined or is empty.
* Magic method to check if a property is defined or not
*
* @param string $name Property name
*
* @return bool
*/
public function __isset($name)
{
return !empty($this->values[$name]) && !($this->values[$name] instanceof NullValue);
return isset($this->values[$name]) && !($this->values[$name] instanceof NullValue);
}

/**
Expand Down Expand Up @@ -166,7 +166,7 @@ public function get($name = null)
*/
public function has($name)
{
return array_key_exists($name, $this->values);
return array_key_exists($name, $this->values) && !($this->values[$name] instanceof NullValue);
}

/**
Expand Down

0 comments on commit aec2cd0

Please sign in to comment.