Closed (fixed)
Project:
Drupal core
Version:
4.6.3
Component:
node system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Jun 2005 at 09:39 UTC
Updated:
22 Oct 2005 at 14:45 UTC
When you configure a content type, for example:
/admin/node/configure/types/forum
you must al least select one checkbox among the default options:
If you leave all of them unchecked, you'll get the following errors when you try to add content of that type:
warning: in_array(): Wrong datatype for second argument in [path-to-site]/modules/node.module on line 1296.
warning: in_array(): Wrong datatype for second argument in [path-to-site]/modules/node.module on line 1297.
warning: in_array(): Wrong datatype for second argument in [path-to-site]/modules/node.module on line 1298.
warning: in_array(): Wrong datatype for second argument in [path-to-site]/modules/node.module on line 1299.
warning: in_array(): Wrong datatype for second argument in [path-to-site]/modules/node.module on line 1300.
I think you can easily duplicate the issue…
Comments
Comment #1
Uwe Hermann commentedI cannot reproduce this in HEAD. Can you please check again?
Comment #2
jvandyk commentedI cannot reproduce in 4.6.3. Tried with story and forum types.
Comment #3
dekkeh commentedI appear to be having the same problem. Node type = image, uploaded with img_assist.
Comment #4
Samat Jain commentedI begun to get this error too. If by default a content-type does not have one of the "Options" set (Published, Sticky, etc), all these errors come up.
The errors look as if it has something to do with PHP5? I'm using:
Comment #5
Samat Jain commentedSteps for me to reproduce on stock Drupal 4.6.3 (with Apache 2 and PHP 5, see previous follow-up) installation:
The errors come up:
Comment #6
Péter Cseke commentedIt happens to mee too.
I'm using Drupal 4.6.3 on Apache2 / PHP5 / MySQL 4.x on Windows.
I also use node privacy byrole module, though I'm not sure if it has something to do with this issue.
If I uncheck all 5 options from the content type configuration settings for a node type, I will get those errors when creating a new node of that specific type. But I get different lines ...
in_array() [function.in-array]: Wrong datatype for second argument in C:\Program Files\Apache Group\Apache2\htdocs\home\modules\node.module on line 1249.
in_array() [function.in-array]: Wrong datatype for second argument in C:\Program Files\Apache Group\Apache2\htdocs\home\modules\node.module on line 1250.
in_array() [function.in-array]: Wrong datatype for second argument in C:\Program Files\Apache Group\Apache2\htdocs\home\modules\node.module on line 1251.
in_array() [function.in-array]: Wrong datatype for second argument in C:\Program Files\Apache Group\Apache2\htdocs\home\modules\node.module on line 1252.
in_array() [function.in-array]: Wrong datatype for second argument in C:\Program Files\Apache Group\Apache2\htdocs\home\modules\node.module on line 1253.
Comment #7
chx commentedThis is a well known problem. If you do not tick any checkbox, then HTML does not post anything and a NULL is saved instead of an array. While this is fixed in 4.7 you can fix it In 4.6 by writing the following to settings.php
and so on for various node types.
Comment #8
(not verified) commented