summaryrefslogtreecommitdiffstats
path: root/lib/class/song.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/class/song.class.php')
-rw-r--r--lib/class/song.class.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/class/song.class.php b/lib/class/song.class.php
index e912e511..8cc89308 100644
--- a/lib/class/song.class.php
+++ b/lib/class/song.class.php
@@ -784,7 +784,7 @@ class Song {
function get_url($session_id='',$force_http='') {
/* Define Variables we are going to need */
- $user_id = scrub_out($GLOBALS['user']->id);
+ $user_id = $GLOBALS['user']->id ? scrub_out($GLOBALS['user']->id) : '-1';
$song_id = $this->id;
if (Config::get('require_session')) {