WordPress.org

Ready to get started?Download WordPress

Forums

Custom Image Sizes
Warning: trim() expects parameter 1 to be string, (2 posts)

  1. Matteo Legittimo
    Member
    Posted 1 year ago #

    Hey,
    why don't you update this plugin, it's really usefull.
    If u can, i get this warning in the backend.
    But it's still working with the last wordpress release!
    Thanks!

    Warning: trim() expects parameter 1 to be string, array given in /Volumes/MAIN/www/domain/wp-content/plugins/custom-image-sizes/filosofo-custom-image-sizes.php on line 47

    http://wordpress.org/extend/plugins/custom-image-sizes/

  2. ewwink
    Member
    Posted 2 months ago #

    replace

    $attachment_id = (int) $attachment_id;
    $size_name = trim($size_name);

    with

    $attachment_id = (int) $attachment_id;
    if(!is_string($size_name)) $size_name= 'thumbnail';
    $size_name = trim($size_name);

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.