Installed Core 7.18 clean, added modules:
Content Access
Adminstration Menu
CTools
Calendar
Date
Date iCal
Advanced Help
Backup and Migrate
Entity
Legal
Pathauto
Token
Global Redirect
Wysiwyg
Views
Installed on a host running Apache and PHP 5.4.9
No content added. Go to Article and click on Access Control and the following error shows up on the top of the access permissions page.
Notice: Array to string conversion in form_process_checkbox() (line 3144 of /xxxxx/y/zzzzzzzz/htdocs/MyWebsite/includes/form.inc).
Really, I didn't do anything yet. I started fresh because the 7.17 to 7.18 update failed and I was trying to find out what was causing that problem. Now I have a working site on 7.18 but cannot use Content Access.
Comments
Comment #1
bblancha commentedI was forced to move to PHP 5.4.9. Could this be the problem?
Comment #2
bblancha commentedI confirmed that this error is related to PHP 5.4 I think. There is a backward incompatibility with non-numeric strig offsets of the form
$data['foo']
PHP.net says the following:
■ Non-numeric string offsets - e.g. $a['foo'] where $a is a string - now return false on isset() and true on empty(), and produce a E_WARNING if you try to use them. Offsets of types double, bool and null produce a E_NOTICE. Numeric strings (e.g. $a['2']) still work as before. Note that offsets like '12.3' and '5 foobar' are considered non-numeric and produce a E_WARNING, but are converted to 12 and 5 respectively, for backward compatibility reasons. Note: Following code returns different result. $str='abc';var_dump(isset($str['x'])); // false for PHP 5.4 or later, but true for 5.3 or less
I must move to 5.4.9 soon or find a new host. Is there a workaround?
Comment #3
salvisI find it very hard to believe that $str['x'] could be legitimate code, no matter what your PHP version is.
Comment #4
bblancha commentedwell it is there in the form.inc file mentioned above. I think it has something to do with indexing into an object that may not be a string. I agree it is obscure.
Comment #5
badrun commentedI have the same error
Notice: Array to string conversion in form_process_checkbox() (line 3144 of /Applications/MAMP/htdocs/MyWebsite/includes/form.inc).
Drupal 7.19
MAMP - PHP 5.4.4
Content Access 7.x-1.2-beta1
Then, I tried with MAMP - PHP 5.2.17, the error is gone. Everything works fine and doesn't show the error messages after clicking submit button.
Comment #6
dianacastillo commentedI have the same problem. Is there any way to fix this without changing the php version?
Comment #7
dianacastillo commentedThis error goes away if I use the dev version 7.x-1.x-dev
Shouldnt that be marked as the recommended version ?
Comment #8
rterrero commentedSolution #7 works perfect for me!
Thanks dianacastillo
Comment #9
haydeniv commentedThis has been fixed in beta-2 and this issue is a duplicate of #1721758: Notice: Undefined index: type in content_access_admin_settin (Integrity constraint violation: 1048 Column 'module' cannot be ).