Doggie52
Member
Posted 4 months ago #
Thank you for a great plugin. I am getting a PHP warning at every site load looking like this:
[24-Jan-2012 15:57:46] PHP Warning: in_array() expects parameter 2 to be array, string given in /wp-content/plugins/advanced-custom-fields/core/fields/checkbox.php on line 58
Do you know a solution to this problem? Am I causing it by some malconfiguration of my fields?
http://wordpress.org/extend/plugins/advanced-custom-fields/
This is a problem for me too... I just installed the plugin and an immediate error... Not feeling good about this plugin.
Updated in latest version.
Michael Cannon
Member
Posted 1 month ago #
@jcow - not quite fixed. For multiple values you're solid, but for single, nope.
My fix suggestion in core/fields/checkbox.php, line 40, add the following.
// single values need array conversion
if(!is_array($field['value'])) $field['value'] = array($field['value']);
Ciao!
Michael
Michael Cannon
Member
Posted 1 month ago #
@jcow, this is in regards to 3.1.7.
Michael Cannon
Member
Posted 2 weeks ago #
Checkbox and radio checking, is still a problem with 3.2.0 for clients.
core/fields/checkbox.php, line 40, below the if(empty…
if(!is_array($field['value'])) $field['value'] = array($field['value']);
elliotcondon
Member
Posted 1 week ago #
Thanks Michael
I'll add this in!
Cheers
E
Michael Cannon
Member
Posted 1 week ago #