WordPress.org

Support

Support » Plugins and Hacks » Warning: trim() expects parameter 1 to be string,

Warning: trim() expects parameter 1 to be string,

Viewing 1 replies (of 1 total)
  • 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);

Viewing 1 replies (of 1 total)
  • The topic ‘Warning: trim() expects parameter 1 to be string,’ is closed to new replies.