Added check for file size to prevent loading deprecated include files (which are...
authorRoland Häder <roland@mxchange.org>
Sat, 23 Jun 2012 11:18:32 +0000 (11:18 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 23 Jun 2012 11:18:32 +0000 (11:18 +0000)
inc/inc-functions.php

index 2534856c2c757d7cc51a76c5d89ade3138d4d11f..ece36ddfa9c31c2e05614f64cd10d55c0f5e08ec 100644 (file)
@@ -148,8 +148,8 @@ function isIncludeReadable ($inc) {
                // Construct FQFN
                $FQFN = getPath() . $inc;
 
-               // Is it readable?
-               $GLOBALS['inc_readable'][$inc] = isFileReadable($FQFN);
+               // Is it readable and at least 50 byte large? Include file sizes < 50 byte are always deprecated
+               $GLOBALS['inc_readable'][$inc] = ((isFileReadable($FQFN)) && (filesize($FQFN) >= 50));
        } // END - if
 
        // Return result