Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi I am getting this error in my logs but everything seems to be working ok.
Strict warning: Only variables should be passed by reference in template_preprocess_video_embed_field_embed_code() (line 355 of \sites\all\modules\contrib\video_embed_field\video_embed_field.module).
// Prepare embed code
if ($handler && isset($handler['function']) && function_exists($handler['function'])) {
$variables['embed_code'] = drupal_render(call_user_func($handler['function'], $variables['url'], $variables['style_settings']));
}
else {
$variables['embed_code'] = l($variables['url'], $variables['url']);
}
Comment | File | Size | Author |
---|---|---|---|
#4 | only_variables_passed_by_reference_1679118_4.patch | 976 bytes | iamcarrico |
Comments
Comment #1
Nikit CreditAttribution: Nikit commentedReplace it:
Or you can move all function code to your theme as YOURTHEMENAME_preprocess_video_embed_field_embed_code() and replace there...
Comment #2
IgnacioAlonso CreditAttribution: IgnacioAlonso commentedThanks, It works
Comment #3
betz CreditAttribution: betz commentedi can confirm this bug, any way to have this committed?
Comment #4
iamcarrico CreditAttribution: iamcarrico commentedConfirm bug. Also can confirm the code works per the above suggestion.
Here is a patch from what @Nikit suggested.
Comment #5
jec006 CreditAttribution: jec006 commentedCommitted and pushed, thanks : http://drupalcode.org/project/video_embed_field.git/commit/ff9d4aa
Comment #7
tiikeri CreditAttribution: tiikeri commentedJust perfect, thanks!
Comment #8
zakir.gori CreditAttribution: zakir.gori commentedI just install weebpal.com/product/education profile and got error and #1 is perfect solution.
Thanks Nikit
Comment #9
Makdomen CreditAttribution: Makdomen commentedThanks Nikit it works
Comment #10
thaistore CreditAttribution: thaistore commentedit just happened on my site
isnt this bug fixes, it is now over 2 years, how come i get the error, i use latest d7
Comment #11
VM CreditAttribution: VM commented#10 you can compare the data of the #5 where the fix was committed and the data of the last release of the module. The commit is in -dev and a new version hasn't been rolled yet.