Created
January 27, 2015 15:09
-
-
Save vdchristelle/7edf1f612c6e3bbbdb37 to your computer and use it in GitHub Desktop.
Video embed field module 7.x-2.0-beta5 - Strict warning: 'Only variables should be passed by reference in template_preprocess'
Bron: https://drupal.org/node/1679118
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/video_embed_field.module b/video_embed_field.module | |
index 54491d4..8a45ebb 100755 | |
--- a/video_embed_field.module | |
+++ b/video_embed_field.module | |
@@ -354,7 +354,8 @@ function template_preprocess_video_embed_field_embed_code(&$variables) { | |
// 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'])); | |
+ $embed_code = call_user_func($handler['function'], $variables['url'], $variables['style_settings']); | |
+ $variables['embed_code'] = drupal_render($embed_code); | |
} | |
else { | |
$variables['embed_code'] = l($variables['url'], $variables['url']); | |
@@ -557,4 +558,5 @@ function _video_embed_field_load_video($hash) { | |
*/ | |
function _video_embed_field_hash($video_url, $video_style){ | |
return md5('vef' . $video_url . $video_style); | |
-} | |
\ No newline at end of file | |
+} | |
+ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment