diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-09-09 06:13:32 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-09-09 06:13:32 +0000 |
commit | b3950d0c942364ce9ab2e99c6914977158b2a09c (patch) | |
tree | 64bf2dbe591ec7d74acb4602ca152c771430f079 /lib/class/scrobbler.class.php | |
parent | f4ad61dccfd3b92760659f0382ca51a14e92a8b8 (diff) | |
download | ampache-b3950d0c942364ce9ab2e99c6914977158b2a09c.tar.gz ampache-b3950d0c942364ce9ab2e99c6914977158b2a09c.tar.bz2 ampache-b3950d0c942364ce9ab2e99c6914977158b2a09c.zip |
new db update, moved prefs around removed useless one and fixed some defaults, also fixed some potential issues with lastfm
Diffstat (limited to 'lib/class/scrobbler.class.php')
-rw-r--r-- | lib/class/scrobbler.class.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/class/scrobbler.class.php b/lib/class/scrobbler.class.php index 78c5f36e..dd9775c3 100644 --- a/lib/class/scrobbler.class.php +++ b/lib/class/scrobbler.class.php @@ -181,10 +181,16 @@ class scrobbler { $i++; } - $as_socket = @fsockopen($this->submit_host, $this->submit_port, $errno, $errstr, 5); + if (!trim($this->submit_host) || !$this->submit_port) { + $this->reset_handshake = true; + return false; + } + + $as_socket = @fsockopen($this->submit_host, intval($this->submit_port), $errno, $errstr, 5); if(!$as_socket) { $this->error_msg = $errstr; + $this->reset_handshake = true; return false; } |