warning: in_array() [function.in-array]: Wrong datatype for second argument in /kunden/96674_30449/webseiten/drupal/sites/all/mo

ferdinand.soethe - September 10, 2008 - 10:38
Project:WYMeditor
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

This error is thrown in D 6.4 when using "show fields" in creating a new content type.

warning: in_array() [function.in-array]: Wrong datatype for second argument in /kunden/96674_30449/webseiten/drupal/sites/all/modules/wymeditor/wymeditor.module on line 157.

#1

Domsou - September 24, 2008 - 22:24

Hi !

I did not succeed to reproduce this warning.
I tested with the 6.x-2.x-dev send on september 24th 2008. (Uggh ! Seems that version number have not been changed !)

So could you please update your WYMeditor module and then give another try. And if it fails again please add a comment with an accurate operating mode in order to help you !

#2

Domsou - September 28, 2008 - 05:28
Status:active» postponed (maintainer needs more info)

#3

zoo33 - October 1, 2008 - 14:59
Status:postponed (maintainer needs more info)» active

I see this too. The problem is that apperently $form[$key]['format']['#element_validate'] isn't always an array. The corresponding line in _wymeditor_input_format_alter() could be changed into:

<?php
       
if (!empty($form[$key]['format']['#element_validate']['filter_form_validate'])) {
?>

#4

zoo33 - October 1, 2008 - 16:56

Oh, crap. That's obviously wrong. Try this:

<?php
       
if (is_array($form[$key]['format']['#element_validate']) && in_array('filter_form_validate', $form[$key]['format']['#element_validate'])) {
?>

#5

fall_0ut - October 8, 2008 - 19:47
Status:active» fixed

Thanks Zoo33 for your code.

This line is corrected, please verify the development version.

#6

Anonymous (not verified) - October 22, 2008 - 19:54
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.