Update_option fails with multi-dimensional array
-
I have a complex array that I am passing to update_option as the option_value. Update_option returns false. Here is a var_dump of the array:
array (size=12)
‘enabled’ => boolean true
‘verbose’ => boolean true
‘do_backtrace’ => int 0
‘logfile’ => string ‘MKP Plugins.log’ (length=15)
‘handler’ =>
array (size=3)
‘function’ => boolean false
‘class’ => string ‘MKP_Base’ (length=8)
‘method’ => string ‘file_logger’ (length=11)
‘show_all_igroups’ => boolean false
‘show_loggedin_igroups’ => boolean false
‘source’ => string ‘MKP Plugins: ‘ (length=13)
‘autoload’ =>
array (size=4)
‘communities’ => boolean false
‘contacts’ => boolean false
‘igroups’ => boolean false
‘mapper’ => boolean false
‘table_name_prefix’ => string ‘mkpusa_’ (length=7)
‘google_api_key_name’ => string ‘mkp_google_api_key’ (length=18)
‘google_api_key_value’ => string ‘xxxxx’ (length=39)`I am assuming that the array is somehow unacceptable to update_option, but I don’t know what the problem is.
- The topic ‘Update_option fails with multi-dimensional array’ is closed to new replies.