Support » Plugin: Original Image Handler » Used image sizes not an array error

  • Please help me solve this issue from my Specs page:

    Uploads total size on activation 167.77 MB
    Saved disk space since activation 0 bytes
    Current uploads directory size: 167.77 MB
    Used image sizes:
    Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/waterloo/public_html/wp-content/plugins/original-image-handler/class-original-image-handler.php on line 730

    Warning: Invalid argument supplied for foreach() in /home/waterloo/public_html/wp-content/plugins/original-image-handler/class-original-image-handler.php on line 733

    http://wordpress.org/plugins/original-image-handler/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Tim Beks

    (@timbeks)

    Hi jamiedewitz,

    Sorry to keep you waiting. I looked into it and what you can do for a temporary fix replace the following:

    $defaults = $this->get_default_image_sizes();
    $sizes = array_merge( $defaults, $_wp_additional_image_sizes );

    for:

    $defaults = $this->get_default_image_sizes();
    if( ! is_array( $_wp_additional_image_sizes ) && empty( $_wp_additional_image_sizes ) ) {
        $_wp_additional_image_sizes = array();
    }
    $sizes = array_merge( $defaults, $_wp_additional_image_sizes );

    Ok thanks so much. 🙂
    Can you answer a couple more questions for me? This plugin only helps with future uploads, correct? It won’t scan the old images and try to decrease disk space, will it?

    Plugin Contributor Tim Beks

    (@timbeks)

    No, it will not scan the upload directory to see if it can reduce the used disk space, but when you are in the gallery on the back-end, it will show you what images should be resized. The image dimensions will show up red if it’s bigger than the dimension setting.
    You can even multiple select a couple of images to bulk resize them. Just do a couple of images at once, because it’s a pretty heavy operation for your server.

    Jamie Dewitz

    (@jgrinnellforbincom)

    Oh that’s perfect. I used the resize function on one image that was showing up red, but now the thumbnail is gone from the media library. Do you know what I can do to get that back?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Used image sizes not an array error’ is closed to new replies.