Warning: Invalid argument supplied for foreach()
-
Minor bug, I was getting this error:
Warning: Invalid argument supplied for foreach() in wp-content/plugins/types/embedded/includes/custom-types.php on line 428
Line 428 is:
$types = get_option(WPCF_OPTION_NAME_CUSTOM_TYPES, array());
But the get_option wasn’t returning an array, even though an array was specified in the second parameter. I fixed this by forcing the type:
$types = (array) get_option(WPCF_OPTION_NAME_CUSTOM_TYPES, array());
Just in case anyone else is having this issue.
-Michael
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Warning: Invalid argument supplied for foreach()’ is closed to new replies.