We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 57f4acf8 authored by P. J. McDermott's avatar P. J. McDermott

Catch Exception from Artist::__construct().

This should resolve issue #246, though a more thorough analysis of why
the artist isn't found in that case would be nice.
parent a4766cc9
......@@ -434,7 +434,11 @@ class User {
$recommendedArtists = array();
foreach($artists as $artist_name) {
$artist = new Artist($artist_name);
try {
$artist = new Artist($artist_name);
} catch (Exception $e) {
continue;
}
$similar = $artist->getSimilar(5);
foreach($similar as $sa) {
if(!array_key_exists($sa['artist'], $recommendedArtists)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment