Support » Plugin: WordPress Popular Posts » exif_imagetype warning

  • Resolved andriushkonis

    (@andriushkonis)


    Hello, I’m encountering a problem in a displayed widget. The output is correct but above of it there are four same warnings:

    Warning: exif_imagetype(): stream does not support seeking in /home/suru/domains/suru.lt/public_html/srwrd/wp-content/plugins/wordpress-popular-posts/wordpress-popular-posts.php on line 2611

    Thanks in advance.

    https://wordpress.org/plugins/wordpress-popular-posts/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi there!

    Problem seems to be that WPP is unable to access some images that are outside your Uploads folder, which triggers those warnings.

    It seems you removed the widget from your sidebar, could you please add it back for a moment so I can test here?

    Yes it was removed. I’ve put it back on

    Plugin Author Hector Cabrera

    (@hcabrera)

    Alright, thanks!

    It seems that despite the warning message the plugin is still able to generate the image which is a good sign.

    For the time being, and until I find a better solution, do the following:

    1. Go to Plugins > Editor and select WordPress Popular Posts from the dropdown at the right.
    2. Find:
      if ( function_exists('exif_imagetype') ) {
      	$image_type = exif_imagetype( $url );
      } else {
      	$image_type = getimagesize( $url );
      	$image_type = ( isset($image_type[2]) ) ? $image_type[2] : NULL;
      }

      and change it to:

      if ( function_exists('exif_imagetype') ) {
      	$image_type = @exif_imagetype( $url );
      } else {
      	$image_type = getimagesize( $url );
      	$image_type = ( isset($image_type[2]) ) ? $image_type[2] : NULL;
      }
    3. Hit the Update file button to save changes.

    Yes, it worked out nicely 🙂

    If that would be of some help, the error appears, when certain posts are in the list. Unfortunately, couldn’t find the pattern upon which it crashes. This one looked to be faulty http://www.suru.lt/mad-max-4-puota-akims-ausims-ir-visiems-raumenims-reikalingiems-spaudziant-gaza/

    Thanks for replying and solving it so fast. Cheers

    Plugin Author Hector Cabrera

    (@hcabrera)

    Yes, that actually helps a lot. With that info, I can identify what the problem is. I’m a bit busy now and won’t be able to do any debugging until next weekend, and I’m probably going to need your help too (if you don’t mind, of course).

    For now, let’s leave it like this. I’ll come back as soon as I can to request your assistance with this, alright?

    Sure thing Hector, would be glad to help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘exif_imagetype warning’ is closed to new replies.