I get a wrong datatype error after installing. I have verified that all my content types have at least 1 default option clicked...in my case publish. I don't know php well enough to fix it. Any ideas?
# warning: Invalid argument supplied for foreach() in /home/moseman/public_html/gapview/sites/all/modules/node2node/node2node.module on line 286.
# warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/moseman/public_html/gapview/sites/all/modules/view_own/view_own.module on line 68.
# warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/moseman/public_html/gapview/sites/all/modules/view_own/view_own.module on line 79.
# warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/moseman/public_html/gapview/sites/all/modules/view_own/view_own.module on line 81.
# warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/moseman/public_html/gapview/sites/all/modules/view_own/view_own.module on line 83.
Seems to be dealing with these 3 lines:
68- if ($restrict_on_owner = in_array($view_own_content, $default_permissions[$rid]) && !$define_node_access) {
79- $edit_perm = in_array($permission, $default_permissions[$rid]) ? 1 : 0;
81- $edit_perm = in_array($permission, $default_permissions[$rid]) ? 1 : 0;
83- $view_perm = (($edit_perm || $delete_perm) ? 1 : in_array($view_any_content, $default_permissions[$rid]));
Comments
Comment #1
djuba commentedcan you provide results of following sql queries?
SELECT r.rid, p.perm FROM role r INNER JOIN permission p ON p.rid = r.ridand
SELECT * FROM role;or if you have no direct access to database try to insert following php code (PLEASE do not do this on real working site, only in developers sandbox) and post results here or send me to email.
try add
after 63 line in view_own.module: $default_permissions = _get_default_permissions();
Comment #2
djuba commentedif your site has role without any permission - then it may cause this warnings and i fix it, so please install release 6.x-1.1 of view own module.
For now I mark issue as fixed, but maybe this is not enough to fix your problem so, feel free to mark it 'active' again and mark it 'closed' if new release really fix your problem.
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.