Skip to content

E_WARNING: array_walk() expects parameter 1 to be array, boolean givenΒ #20

@jgraup

Description

@jgraup

I seem to be getting a large amount of these warnings - most specifically with the use of the_post_thumbnail.

E_WARNING: array_walk() expects parameter 1 to be array, boolean given
in array_walk called at /wordpress/wp-content/plugins/dynamic-cdn-master/includes/functions/core.php (140)
in EAMann\Dynamic_CDN\Core\srcsets called at /wordpress/wp-includes/class-wp-hook.php (286)
in WP_Hook::apply_filters called at /wordpress/wp-includes/plugin.php (203)
in apply_filters called at /wordpress/wp-includes/media.php (1203)
in wp_calculate_image_srcset called at /wordpress/wp-includes/media.php (896)
in wp_get_attachment_image called at /wordpress/wp-includes/post-thumbnail-template.php (150)
in get_the_post_thumbnail called at /wordpress/wp-includes/post-thumbnail-template.php (62)
in the_post_thumbnail called at /wordpress/wp-content/themes/my-theme-name/some-file.php (72)

Is there anyway you can check the return of srcset_replacer( get_site_domain() ); before running array_walk( $sources, $replacer );?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions