--- flvmediaplayer.module	Sat Sep 13 16:34:12 2008
+++ flvmediaplayer.new.module	Tue Sep 23 12:39:05 2008
@@ -791,7 +791,7 @@
 function flvmediaplayer_extend_fire($hook, $op, $config_name = NULL, $node = NULL, $config = NULL) {
   // split the config_name data up
   list($module_name, $separator, $name) = split('[--]', $config_name);
-  if (module_exists($module_name) && $output = module_invoke($module_name, $hook, $op, $name, $node, $config)) {
+  if (module_exists($module_name) && $output = module_invoke($module_name, $hook, $op, $node, $config)) {
     return $output;
   }
 }
@@ -840,7 +840,7 @@
  * @param boolean $use_external_config_file controls how the data is handed back
  * @return array of flash player data
  */
-function flvmediaplayer_build_player_data($node, $config, $use_external_config_file = false) {
+function flvmediaplayer_build_player_data($node = null, $config = null, $use_external_config_file = false) {
   // get dimensions for the flash player
   $size = preg_split('/x/i', $config['size']);
   
@@ -878,7 +878,7 @@
     // just supply the url to the config. this is somewhat problematic as we're
     // assuming this is a node. clean this up
     else {
-      $flashvars['config'] = variable_get('flvmp_base_url', flvmediaplayer_url('flvmediaplayer/node/' . $node->nid));
+      $flashvars['config'] = variable_get('flvmp_base_url', flvmediaplayer_url('/flvmediaplayer/node/' . $node->nid));
     }
   }
   else {  
@@ -1008,16 +1008,18 @@
   // make sure we have incoming data
   if ($data) {
     // now generate the param code 
+	if (is_array($data['params'])) {
     foreach ($data['params'] as $param_name => $param) {
       $object_params .= $param_name .'="'. $param .'" ';
     }
-    
+    }
+	if (is_array($data['flashvars'])) {
     // now generate the flashvars
     foreach($data['flashvars'] as $varname => $avar) {    
       $object_flashvars[] = "$varname=$avar";
     }
     $object_flashvars = implode("&", $object_flashvars);
-   
+	}
     return theme('flvmediaplayer_embed_code', $data['player_path'], $data['params'], $object_params, $object_flashvars);
   }
 }
