Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

@@ -31,6 +31,7 @@ foreach ($bridges as $key => $bridge) {
echo "\tBridge #", ++$key, "\n";
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