Warning: Invalid argument supplied for foreach()
-
Hello, first af all thank you for this amazing plugin!
When I try to view a “tag” page (as in https://www.mysite.com/tag/tag-name) I get this error:Warning: Invalid argument supplied for foreach() in /web/htdocs/www.MYSITE.it/home/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/package.module.nextgen_gallery_display.php on line 1852
The 1852 line is
foreach ($display_type->entity_types as $type) {
1846-1866 lines:
public function is_compatible($source, $display_type) { $retval = FALSE; if ($source = $this->get($source->name)) { // Get the real entity type names for the display type $display_type_entity_types = array(); foreach ($display_type->entity_types as $type) { $result = $this->get_entity_type($type); if ($result) { $display_type_entity_types[] = $result; } } foreach ($source->returns as $entity_type) { if (in_array($entity_type, $display_type_entity_types, TRUE)) { $retval = TRUE; break; } } } return $retval; }
The error does NOT appear when viewing category pages. How can I fix it?
Thank you!
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘Warning: Invalid argument supplied for foreach()’ is closed to new replies.