Skip to content

Fix notice if no mac address returned by the api.#128

Open
neoteknic wants to merge 1 commit intosqmk:masterfrom
neoteknic:patch-2
Open

Fix notice if no mac address returned by the api.#128
neoteknic wants to merge 1 commit intosqmk:masterfrom
neoteknic:patch-2

Conversation

@neoteknic
Copy link

My request on https://www.meethue.com/api/nupnp return no mac address, so there is a notice of undefined $macadress in the stdclass.

@neoteknic neoteknic closed this Jan 11, 2018
@neoteknic neoteknic reopened this Jan 11, 2018
Copy link
Owner

@sqmk sqmk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'll pull this in for the next release.

echo "\t\tID: ", $bridge->id, "\n";
echo "\t\tInternal IP Address: ", $bridge->internalipaddress, "\n";
echo "\t\tMAC Address: ", $bridge->macaddress, "\n";
if(isset($bridge->macaddress))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow PSR-2 for coding standards (http://www.php-fig.org/psr/psr-2/#51-if-elseif-else)

Add a space after if, use curly braces for conditionals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants