ampache / ampache

A web based audio/video streaming application and file manager allowing you to access your music & videos from anywhere, using almost any internet enabled device.
http://ampache.org
GNU Affero General Public License v3.0
3.53k stars 588 forks source link

Runtime error for ShowAction.php #3340

Open SimonHova opened 2 years ago

SimonHova commented 2 years ago

Description

The log files keep displaying random runtime errors. They don't affect performance, but because the error is so specific, it should be easy to squash

Logs

2022-09-06T08:49:48-04:00 [ampache] (log.lib) -> [Runtime Error] Undefined array key "form" in file /opt/ampache/src/Module/Application/Image/ShowAction.php(164)
2022-09-06T08:49:48-04:00 [ampache] (log.lib) -> [Runtime Error] Trying to access array offset on value of type null in file /opt/ampache/src/Module/Application/Image/ShowAction.php(164)
2022-09-06T08:49:48-04:00 [ampache] (log.lib) -> [Runtime Error] Trying to access array offset on value of type null in file /opt/ampache/src/Module/Application/Image/ShowAction.php(164)
2022-09-06T08:49:48-04:00 [ampache] (log.lib) -> [Runtime Error] Undefined array key "form" in file /opt/ampache/src/Module/Application/Image/ShowAction.php(165)
2022-09-06T08:49:48-04:00 [ampache] (log.lib) -> [Runtime Error] Trying to access array offset on value of type null in file /opt/ampache/src/Module/Application/Image/ShowAction.php(165)
2022-09-06T08:49:48-04:00 [ampache] (log.lib) -> [Runtime Error] Trying to access array offset on value of type null in file /opt/ampache/src/Module/Application/Image/ShowAction.php(165)
2022-09-06T08:49:48-04:00 [ampache] (log.lib) -> [Runtime Error] Trying to access array offset on value of type null in file /opt/ampache/src/Module/Application/Image/ShowAction.php(165)
lachlan-00 commented 2 years ago

This would probably be an empty session somewhere. should be okay by checking before loading the image 003bbf650

SimonHova commented 2 years ago

That error has vanished with the latest commit, but now I have a different (non-affecting) runtime error when inserting art:

2022-09-08T05:14:09-04:00 [ampache] (log.lib) -> [Runtime Error] Undefined array key "title" in file /opt/ampache/public/templates/show_arts.inc.php(55) 2022-09-08T05:14:09-04:00 [simon] (Ampache\Module\System\Core) -> Cannot create image from empty data

lachlan-00 commented 2 years ago

I think that's the hover title for the art in art selection. can you see any empty title html for the art on the page?

image

SimonHova commented 2 years ago

I think that I found the link that you were referring to by right clicking on the invalid ID3 art and clicking on the Inspect link. Does this look right? image It seems to match yours, but it has an extra bit of logic after it.