Download & Extend

Wrong datatype for second argument filefield.module on line 289.

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

Issue Summary

Testing with Views RC2 and CCK RC7

Checkout out module HEAD as of today.

Added a single file file w/ upload widget to story type.

On node/add/story:

warning: in_array() [function.in-array]: Wrong datatype for second argument in /Users/Shared/www/AD-1.0-6.x/modules/acquia/filefield/filefield.module on line 289.

<?php
 
if (!in_array('filefield_node_form_submit', $form['#submit'])) {
   
$form['#submit'][] = 'filefield_node_form_submit';
  }
?>

Lokks like it's no set.

Comments

#1

Status:active» needs review

just need to check if before passing to in_array I think.

AttachmentSize
not-set-arg-308832-1.patch 1.04 KB

#2

Status:needs review» reviewed & tested by the community

I patch above alleviates the error and is safe too.

Given that it's pretty trivial, I think it's RTBC

#3

this is a dupe of at least two issues (#296350: Wrong datatype and #305905: warning: in_array() in filefield.module ) but since it's got a patch it wins.

committed to HEAD.

#4

Status:reviewed & tested by the community» fixed

also marking #297395: warning: in_array() [function.in-array]: as a duplicate.

#5

Status:fixed» closed (fixed)

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

nobody click here