WordPress.org

Ready to get started?Download WordPress

Forums

MimeTypes Link Icons
[resolved] [Small bug+possible fix] Errors in log when querying external files (2 posts)

  1. jrf
    Member
    Plugin Contributor

    Posted 1 year ago #

    Hi Toby,

    I came across a curious error message in the logs and made a small code change which seems to fix it (though it might break other things?).
    Could you please review it ?

    Thx!

    Smile,
    Juliette

    Error found:
    [16-Feb-2013 11:42:36] PHP Warning: filesize(): stat failed for http://www.vook.nl/files/Een%20eigen-wijs%20verhaal.pdf in /website/wp-content/plugins/mimetypes-link-icons/mime_type_link_images.php on line 365
    [16-Feb-2013 11:44:07] PHP Warning: filesize(): stat failed for http//www.vook.nl/files/Een%20eigen-wijs%20verhaal.pdf in /website/wp-content/plugins/mimetypes-link-icons/mime_type_link_images.php on line 365

    Suggested fix:

    File mime_type_link_images.php

    Find line 357:

    if(strpos($filePath,'http://')!==false && strpos($filePath,$_SERVER['SERVER_NAME'])===false){ // We have an external file to size up

    Possibly replace with:

    if( strpos($filePath,$_SERVER['SERVER_NAME'])===false){ // We have an external file to size up
    		if( strpos($filePath,'http://')===false ) {
    			$filePath = 'http://' . $filePath;
    		}

    http://wordpress.org/extend/plugins/mimetypes-link-icons/

  2. jrf
    Member
    Plugin Contributor

    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic