diff options
Diffstat (limited to 'lib/class/localplay.class.php')
-rw-r--r-- | lib/class/localplay.class.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/class/localplay.class.php b/lib/class/localplay.class.php index 488714ea..b9f0d8cc 100644 --- a/lib/class/localplay.class.php +++ b/lib/class/localplay.class.php @@ -73,6 +73,8 @@ class Localplay { */ function _load_player() { + if (!$this->type) { return false; } + $filename = conf('prefix') . '/modules/localplay/' . $this->type . '.controller.php'; $include = require_once ($filename); @@ -173,9 +175,13 @@ class Localplay { */ function connect() { - $function = $this->_function_map['connect']; - + + /* This is very bad, that means they don't even + * have a connection function defined + */ + if (!$function) { return false; } + if (!$this->_player->$function()) { debug_event('localplay','Error Unable to connect, check ' . $this->type . ' controller','1'); return false; |