WordPress.org

Support

Support » Plugins and Hacks » MimeTypes Link Icons » [Resolved] [Small bug possible fix] Errors in log when querying external files

[Resolved] [Small bug possible fix] Errors in log when querying external files

  • Plugin Contributor jrf

    @jrf

    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/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] [Small bug possible fix] Errors in log when querying external files’ is closed to new replies.
Skip to toolbar