diff --git a/includes/themes/media_vimeo.theme.inc b/includes/themes/media_vimeo.theme.inc index 12b6b07..b593c8e 100644 --- a/includes/themes/media_vimeo.theme.inc +++ b/includes/themes/media_vimeo.theme.inc @@ -13,7 +13,12 @@ function media_vimeo_preprocess_media_vimeo_video(&$variables) { // Build the URL for display. $uri = $variables['uri']; $wrapper = file_stream_wrapper_get_instance_by_uri($uri); - $parts = $wrapper->get_parameters(); + + $parts = null; + + if (is_object($wrapper)) + $parts = $wrapper->get_parameters(); + $variables['video_id'] = check_plain($parts['v']); $variables['width'] = isset($variables['width']) ? $variables['width'] : media_vimeo_variable_get('width');