I noticed the error regarding Web Widgets ever since upgrading from PHP 5.3.3 to PHP 7.0.2. Line 1088 is the following:
$variables += $info['variables'];
After originally posting in the module's issue queue, I was told by the maintainer that a theme function with a value instead of an array needs to be called. So I checked the web_widgets.module file, and found three functions that return the theme variable, at least one of which I think might be the source of the problem:
1):
function web_widgets_theme($existing, $type, $theme, $path) {
$theme = array(
'web_widgets_embed_code' => array(
'variables' => array('code' => NULL, 'style' => NULL),
),
'web_widgets_tracking_code' => array(
'variables' => array('id' => NULL),
),
);
$style_files = array_keys(web_widgets_get_styles());
foreach ($style_files as $style) {
require_once DRUPAL_ROOT . '/' . web_widgets_get_style_inc($style);
$definition = call_user_func('web_widgets_style_' . $style);
if (is_array($definition['theme'])) {
$theme += $definition['theme'];
}
}
return $theme;
}
2):
function web_widgets_render_embed_code($style, $variables) {
require_once DRUPAL_ROOT . '/' . web_widgets_get_style_inc($style);
// TODO Please change this theme call to use an associative array for the $variables parameter.
$code = theme('web_widgets_' . $style, $variables);
// TODO Please change this theme call to use an associative array for the $variables parameter.
return theme('web_widgets_embed_code', array('code' => $code, 'style' => $style));
}
3):
function web_widgets_render_widget($style, $content, $title, $add_target = TRUE, $scripts = array(), $styles = array()) {
require_once DRUPAL_ROOT . '/' . web_widgets_get_style_inc($style);
if ($add_target === TRUE) {
$content = _web_widgets_rewrite_anchors($content);
}
module_invoke_all('web_widgets_render_widget', $content, $title);
return theme('web_widgets_' . $style . '_wrapper', array(
'content' => $content,
'title' => $title,
'scripts' => $scripts,
'styles' => $styles
));
}
This is how far I got so far. Does anyone know how to solve this issue, or at least its level of complexity? Any help would be greatly appreciated.
theme()
that is getting a value that is not an array as second argument; which module is doing that is not known. You just need to debug your site; we cannot do it for you.