bren1818 / TCPLightingWebInterface

Web App interface to control the "Connected by TCP" bulbs
MIT License
30 stars 15 forks source link

Single room issue #4

Closed ozthegreat closed 8 years ago

ozthegreat commented 8 years ago

Hey,

In index.php and include.php the $DATA = $array["gwrcmd"]["gdata"]["gip"]["room"]; variable is expecting an array of arrays, however if you only have one room setup you simply get a single array containing the values. This is easily fixed with something like:

if ( isset( $DATA["rid"] ) ) $DATA = array( $DATA );

Thanks

bren1818 commented 8 years ago

Thanks Edward, I'll look into addressing that issue.

I actually recently wiped my hub, so I think I noticed that but haven't pushed the fix yet.

Cheers and happy Halloween 😄

On Monday, 31 October 2016, Edward D notifications@github.com wrote:

Hey,

In index.php and include.php the $DATA = $array["gwrcmd"]["gdata"][" gip"]["room"]; variable is expecting an array of arrays, however if you only have one room setup you simply get a single array containing the values. This is easily fixed with something like:

if ( isset( $DATA["rid"] ) ) $DATA = array( $DATA );

Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bren1818/TCPLightingWebInterface/issues/4, or mute the thread https://github.com/notifications/unsubscribe-auth/ACDCH5ETLR2XkM7-PcQiNQEq7QAvzx2xks5q5l-dgaJpZM4KliKL .