Invalid argument supplied for foreach() //wp-includes/media.php on Mandigo theme
-
Hello. I am doing some work for a client and am having issues fixing an error that keeps coming up it says on the header when you go into the wordpress dashboard the following:
Invalid argument supplied for foreach() in /data/16/1/14/111/1503926/user/1617919/htdocs/wp-includes/media.php on line 912
And here is the code below for that part of wp-includes/media.php that is showing an error. The code starts at 909 and ends with 921
function get_taxonomies_for_attachments( $output = 'names' ) { $taxonomies = array(); foreach ( get_taxonomies( array(), 'objects' ) as $taxonomy ) { foreach ( $taxonomy->object_type as $object_type ) { if ( 'attachment' == $object_type || 0 === strpos( $object_type, 'attachment:' ) ) { if ( 'names' == $output ) $taxonomies[] = $taxonomy->name; else $taxonomies[ $taxonomy->name ] = $taxonomy; break; } } }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Invalid argument supplied for foreach() //wp-includes/media.php on Mandigo theme’ is closed to new replies.