--- flvmediaplayer.module	Sat Sep 13 16:34:12 2008
+++ flvmediaplayer.new.module	Wed Sep 24 10:56:51 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);
   }
 }
@@ -1391,14 +1393,14 @@
  * @param array $config is an array of vars and params to replace OR a drupal node
  * @return string player display code
  */
-function theme_flvmediaplayer_profile_display($profile_name, $node, $config = array()) {  
+function theme_flvmediaplayer_profile_display($profile_name, $config = array()) {  
   // build the data into the correct format
   $data = flvmediaplayer_profile_node_params($profile_name, $node, $config);
 
   // render the player
   if ($data) {
   	$output = flvmediaplayer_render_player($data['player_path'], $data['params'], $data['flashvars']);
-
+	if (is_array($data)){
     // should we attach embed code?
     if ($data['config']['embed']) {
       // now generate the param code 
@@ -1414,6 +1416,7 @@
       
     	$output .= theme("flvmediaplayer_embed_code", $data['player_path'], $data['params'], $object_params, $object_flashvars);
     }
+}
   
     return $output;
   }
