I get a white screen and this error appears in my apache error logs.

PHP Fatal error:  [] operator not supported for strings in /home/drupal/drupal7/sites/example.com/themes/omega/omega/template.php on line 337

This only happens when skinr (7.x-2.x-dev) is enabled and I click the link "Edit skin" in the blocks contextual links drop-down:

The current parent theme I'm using is omega-7.x-4.2+2-dev.
If I comment out template.php line 337 mentioned in that error message, then all seems to work well.

CommentFileSizeAuthor
#5 skinr-class_not_array-2204221-5.patch577 bytesmoonray

Comments

kendouglass’s picture

Issue summary: View changes
fubhy’s picture

Project: Omega » Skinr
Version: 7.x-4.x-dev » 7.x-2.x-dev

That's a bug in Skinr module then (using a string in 'class' in the #attributes array). That's supposed to be an array. Always.

fubhy’s picture

The bug is in skinr_ui.edit.inc on line 85.

  84   // Set form class.
  85   $form['#attributes'] = array('class' => 'skinr-form');

should be:

  84   // Set form class.
  85   $form['#attributes']['class'][] = 'skinr-form';
fubhy’s picture

I commited http://drupalcode.org/project/omega.git/commit/d4a3d1d to Omega. We now check if the 'class' property is (incorrectly) set to a string and explode it into an array if that's the case. This prevents the notices/fatals from occurring but it should still be fixed in Skinr too.

moonray’s picture

Status: Active » Needs review
StatusFileSize
new577 bytes

Good catch, thanks.

  • Commit b445dbb on 7.x-2.x by moonray:
    Issue #2204221 by fubhy | kendouglass: Fixed class is not an array.
    
moonray’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.