I get the following error after I enable the media:hulu module and try to add a hulu url to an emfield:

warning: Parameter 6 to emvideo_hulu_video() expected to be a reference, value given in /srv/www/mindmash.net/public_html/sites/default/modules/emfield/emfield.module on line 650

I don't know PHP so it's difficult to know whatchange to make to emfield.module

The weird thing is, it downloads the thumbnail with no problem.

Using JWplayer, but it fails to load the video as well.

I had things working on shared hosting with little trouble. Don't know why it's not working on my VPS site.

Any ideas?

CommentFileSizeAuthor
#4 media_hulu-812540-4.patch1.49 KBwmasterj

Comments

cheshirecat73’s picture

Here is the function from my emfield.module file:


function emfield_include_invoke() {
  $args     = func_get_args();
  $module = array_shift($args);
  $provider  = array_shift($args);
  $hook     = array_shift($args);
  $function = $module .'_'. $provider .'_'. $hook;
  emfield_system_list($module, $provider);
  return emfield_include_hook($module, $provider, $hook) ? call_user_func_array$
}

line 650 starts with "return emfield."

alex ua’s picture

Title: Error in line 650 of emfield.module when trying to add hulu url to an emfield » Error when trying to add hulu url to an emfield
Project: Embedded Media Field » Media: Hulu
Version: 6.x-2.x-dev » 6.x-1.x-dev
Component: Providers » Code

I'm not seeing the original message, but I do see this one:

warning: unserialize() expects parameter 1 to be string, array given in C:\xampp\htdocs\drupal6test\sites\all\modules\media_hulu\providers\hulu.inc on line 174.
Moving to the Media: Hulu queue

YK85’s picture

Hello,

Is this still an issue?
Are we able to paste the link like below to embed?
http://www.hulu.com/watch/217127/attack-of-the-show-fred-armisen-talks-p...

Thank you!

wmasterj’s picture

Title: Error when trying to add hulu url to an emfield » Error in line 650 of emfield.module when trying to add hulu url to an emfield
Priority: Normal » Minor
Status: Active » Needs review
StatusFileSize
new1.49 KB

Changed the title back to the original issue since they don't seem to be related.

I had the same problem.
The original issues was due to the fact that in hulu.inc on row 164 it wants to pass $node as a reference:

function emvideo_hulu_video($embed, $width, $height, $field, $item, &$node, $autoplay) {

What fixed it for me was to change that line to:

function emvideo_hulu_video($embed, $width, $height, $field, $item, $node, $autoplay) {

This was a warning and so on a production server that doesn't show warning messages from the PHP engine this would not be shown. With other words this is a minor issue. Please note that other, bigger, media modules don't try to pass $node by reference either so this complies with how the community in general is doing it.

Patch attached.