tswaehn / phpmp

phpMp[v0.14.4] for PHP7.3
http://phpmpreloaded.sourceforge.net/
GNU General Public License v2.0
3 stars 1 forks source link

PHP Notice: Undefined index: volume in playlist.php on line 524 #6

Open Gerard64 opened 4 years ago

Gerard64 commented 4 years ago

In my apache error log i see: PHP Notice: Undefined index: volume in /var/www/html/sysadmin/phpmp/playlist.php on line 524

In playlist.php i added above line 524:

if(isset($status["volume"])){ $status["volume"] = $status["volume"]; } else { $status["volume"] = ""; } The php notice is gone but i can't test de volume on my server.

Gerard64 commented 4 years ago

Maybe this is better. Again above line 524:

if(!isset($status["volume"])){ $status["volume"] = NULL; }

tswaehn commented 4 years ago

@Gerard64 I respect your comment. I changed the volume up and down. however I cannot reproduce the error.

my testet version is: phpMp Version: 0.14.4

Could you please help me to understand the replication procedure?

Thanks in advance.

Gerard64 commented 4 years ago

The volume option does't work on my virtual lxc debian 10 system. I can't change volume with "mpc volume n" either. If I do "mpc volume" is gives n/a.

After latest changes I started using 0.14.4 and checked my apache error logs and found: "PHP Notice: Undefined index: volume in /var/www/html/sysadmin/phpmp/playlist.php on line 524" This error was also with 0.14.0 so i used the same adjustment with 0.14.4 adding above line 524: if(!isset($status["volume"])){ $status["volume"] = NULL; } I use phpmp on a lxc debian 10 with Apache/2.4.38 and php 7.3. "mpc volume" gives n/a so i can't test if my adjustment is working on a mpd system with working volume.

I'm using mpd not with soundcard but to stream liquidsoap/icecast.

tswaehn commented 4 years ago

I see, the trick is to not have volume adjustment, but still trying to set volume, ...

I can test that scenario. Thanks

tswaehn commented 4 years ago

Sorry, I was not review this for long time,...

tswaehn commented 4 years ago

You can leave it open for me,... :)

Gerard64 commented 4 years ago

Oke sorry. I thought i should've closed earlier and forgot to do that.