Either the error was coming with upgrade to 7.10 or it was there before w/o me recognising it.
When the WYSIWYG Filter module is activated and I go to admin/structure/block/add I'll get the following error:

Fatal error: Unsupported operand types in /var/www/vhosts/lokarabia-stage.de/httpdocs/modules/filter/filter.module on line 683

which code is

<?php
$filter
->settings += $filter_info[$name]['default settings'];
?>

It seems some settings probably have a wrong format, but I'm quite new to Drupal and therefore cannot easily locate the error or wrong setting format.

Tell me if and how I can be of further help to debug it.

Comments

mariomaric’s picture

Priority:Major» Normal

Hi.

I have fresh D7.10 and WYSIWYG Filter 7.x-1.6-rc2 enabled and activated in one text format and I cannot reproduce your error..

jazzitup’s picture

Issue summary:View changes

I could reproduce the issue. I tried it with PHP 5.3 and PHP 5.5:

PHP Fatal error:  Unsupported operand types in /var/www/drupal/dev/modules/filter/filter.module on line 718
PHP Stack trace:
PHP   1. {main}() /var/www/drupal/dev/index.php:0
PHP   2. menu_execute_active_handler() /var/www/drupal/dev/index.php:21
PHP   3. drupal_deliver_page() /var/www/drupal/dev/includes/menu.inc:532
PHP   4. drupal_deliver_html_page() /var/www/drupal/dev/includes/common.inc:2563
PHP   5. menu_execute_active_handler() /var/www/drupal/dev/includes/common.inc:2621
PHP   6. call_user_func_array() /var/www/drupal/dev/includes/menu.inc:517
PHP   7. node_page_view() /var/www/drupal/dev/includes/menu.inc:0
PHP   8. node_show() /var/www/drupal/dev/modules/node/node.module:2757
PHP   9. node_view_multiple() /var/www/drupal/dev/modules/node/node.module:1472

Disabling the module helps as a workaround to bring back the site.
drush dis wysiwyg_filter && drush cc all && drush cron

jazzitup’s picture

This is definitely a wysiwyg_filter's issue:

I replaced the following line 718 inside of the filter.module:

<?php
          $filter
->settings += $filter_info[$name]['default settings'];
?>

... with this:

<?php
         
if (!is_array($filter->settings)) var_dump($filter);
         
$filter->settings += $filter_info[$name]['default settings'];
?>

The output:

object(stdClass)[404]
  public 'format' => string 'full_html' (length=9)
  public 'module' => string 'wysiwyg_filter' (length=14)
  public 'name' => string 'wysiwyg' (length=7)
  public 'weight' => string '0' (length=1)
  public 'status' => string '0' (length=1)
  public 'settings' => boolean false
  public 'title' => string 'WYSIWYG Filter' (length=14)
object(stdClass)[419]
  public 'format' => string 'filtered_html' (length=13)
  public 'module' => string 'wysiwyg_filter' (length=14)
  public 'name' => string 'wysiwyg' (length=7)
  public 'weight' => string '0' (length=1)
  public 'status' => string '0' (length=1)
  public 'settings' => boolean false
  public 'title' => string 'WYSIWYG Filter' (length=14)

If I replace again the aforementioned line 718, but this time with:

<?php
         
if (!is_array($filter->settings)) $filter->settings = array();
         
$filter->settings += $filter_info[$name]['default settings'];
?>

I temporarily fixed the issue and see no PHP errors.
Wysiwyg should fix the $filter->settings before passing it to filter_list_format().

jazzitup’s picture

Priority:Normal» Critical

Marking this bug as critical, since it breaks the site.

Jorge Navarro’s picture

The problem also comes by using HTML Purifier. #3 Fixes the issue... there should be some text format settings causing this problem, patching core is always a problem.

drupalnewie @berfi’s picture

After moving site from folder to another folder, i face this similar issue. The numbers in here didn't solve my problem.