From 8442e4c7dbb9bad0386489418567c667e7b5ed91 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Tue, 25 Dec 2007 15:45:39 +0000 Subject: dont even try to do handshake if password or username have a strlen of 0 --- modules/plugins/Lastfm.plugin.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/plugins') diff --git a/modules/plugins/Lastfm.plugin.php b/modules/plugins/Lastfm.plugin.php index 0804bb26..6e4b2ab4 100644 --- a/modules/plugins/Lastfm.plugin.php +++ b/modules/plugins/Lastfm.plugin.php @@ -172,16 +172,18 @@ class AmpacheLastfm { */ public function load($data,$user_id) { - if (isset($data['lastfm_user'])) { + if (strlen($data['lastfm_user'])) { $this->username = $data['lastfm_user']; } else { + debug_event('LastFM','No Username, not scrobbling','3'); return false; } - if (isset($data['lastfm_pass'])) { + if (strlen($data['lastfm_pass'])) { $this->password = $data['lastfm_pass']; } else { + debug_event('LastFM','No Password, not scrobbling','3'); return false; } -- cgit