Download & Extend

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

Project:WYMeditor
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

Comments

#1

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

Status:active» postponed (maintainer needs more info)

#3

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

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

Status:active» fixed

Thanks Zoo33 for your code.

This line is corrected, please verify the development version.

#6

Status:fixed» closed (fixed)

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