• Resolved Steve

    (@steveatty)


    I’m getting a lot of PHP warnings:

    [31-Mar-2015 20:31:24 UTC] PHP Warning: getimagesize(1) [<a href='function.getimagesize'>function.getimagesize</a>]: failed to open stream: No such file or directory in /webstuff/blogs/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php on line 656

    which is the backup_image function:

    if ($image_path = $this->object->get_image_abspath($image)) {
                $retval = copy($image_path, $this->object->get_backup_abspath($image));
                // Store the dimensions of the image
                if (function_exists('getimagesize')) {
                    $mapper = C_Image_Mapper::get_instance();
                    if (!is_object($image)) {
                        $image = $mapper->find($image);
                    }
                    if ($image) {
                        $dimensions = getimagesize($retval);
                        $image->meta_data['backup'] = array('filename' => basename($retval), 'width' => $dimensions[0], 'height' => $dimensions[1], 'generated' => microtime());
                        $mapper->save($image);
                    }
                }
            }

    The problem is that you are calling getimagesize($retval) but $retval is returned from the copy function and is thus a boolean and NOT a filename.

    https://www.ads-software.com/plugins/nextgen-gallery/

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Warning: getimagesize(1)’ is closed to new replies.