Liver64/LoxBerry-Sonos

After update to v3.9.0, sendmessage is not working anymore

Closed this issue · 2 comments

After I updated to v3.9.0 the following call is not working anymore

http://192.168.1.55/plugins/sonos4lox/index.php?zone=mobil&action=sendmessage&messageid=666&volume=40

Before the update I had no issues.

The log starts with this

array_key_exists() expects parameter 2 to be array, null given

/opt/loxberry/webfrontend/html/plugins/sonos4lox/Sonos.php:194

So the logging seems not work as expected as $sonoszone is null.

Not sure where $sonoszone comes from or how to fix this for testing. Have to dig into or maybe you have already an idea. :)

Some news here. I was able to make it work again by initializing $sonoszone in case it is empty on line 195.

$sonoszone = empty($sonoszone) ? [] : $sonoszone;

This makes it work in general. The weird thing is that the error is gone now, and if I output $sonoszone it contains my player.

What is not working now, but was working before is resuming playback. The playlist and the current song are restored. But they playback is not started again.

Any idea why tha playback is not started anymore?

Please update to latest release