Skip to content

Commit

Permalink
Check if color mode property exists before returning it
Browse files Browse the repository at this point in the history
  • Loading branch information
KarimGeiger committed Oct 13, 2016
1 parent 2503ea2 commit bf406a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Phue/Light.php
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ public function setColorTemp($value)
*/
public function getColorMode()
{
return $this->attributes->state->colormode;
return property_exists($this->attributes->state, 'colormode') ? $this->attributes->state->colormode : null;
}

/**
Expand Down

0 comments on commit bf406a0

Please sign in to comment.