Anybody have any ideas what could be causing these errors?
Affects all events. On first installation of module errors appeared on initial presentation of create event. Returned to fresh backup of database and tried again and no errors when event created but appeared on first attempt to edit event. Then errors were consistently present with all view, create, edit actions. With fresh third install errors appeared immediately after install when going to view or edit screen with no events.
Events appear to be created and work without any other problems if errors are ignored.
[Using Drupal 5.7, JScalendar 5.x-0.8]
Message displayed when creating or viewing an event:
* warning: in_array() [function.in-array]: Wrong datatype for second argument in C:\xampp\htdocs\drupal\modules\node\node.module on line 2057.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in C:\xampp\htdocs\drupal\modules\node\node.module on line 2057.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in C:\xampp\htdocs\drupal\modules\node\node.module on line 2057.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in C:\xampp\htdocs\drupal\modules\node\node.module on line 2063.
Sometimes a single error message displayed when editing an event:
* warning: in_array() [function.in-array]: Wrong datatype for second argument in C:\xampp\htdocs\drupal\modules\node\node.module on line 2057.
or
* warning: in_array() [function.in-array]: Wrong datatype for second argument in C:\xampp\htdocs\drupal\modules\node\node.module on line 2063.
Below is the affected code from the node.module that is referrenced. Common element seems to be '$node_options'
2053 $node_options = variable_get('node_options_'. $node->type, array('status', 'promote'));
2054 // If this is a new node, fill in the default values.
2055 if (!isset($node->nid)) {
2056 foreach (array('status', 'promote', 'sticky') as $key) {
2057 $node->$key = in_array($key, $node_options);
2058 }
2059 global $user;
2060 $node->uid = $user->uid;
2061 }
2062 // Always use the default revision setting.
2063 $node->revision = in_array('revision', $node_options);
2064
Comments
Comment #1
wiredescape commentedFound this old report #25593: wrong datatype triggered by content type configuration related to a bug in Drupal 4.6.3 that was "fixed in 4.7".
My problem appeared after a new content type was created after events module was installed.
Adding the following to the settings.php solved the problem (modified to match content type throwing errors).
Comment #2
japerryEvent for Drupal 8 is unrelated to older versions. If an issue similar to this one exists, please open a new issue with the 8.x branch.