Sanity check added to make sure the file is really there
authorRoland Häder <roland@mxchange.org>
Sat, 6 Jun 2009 21:35:11 +0000 (21:35 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 6 Jun 2009 21:35:11 +0000 (21:35 +0000)
inc/wrapper-functions.php

index bed3c34..3b3b9b2 100644 (file)
@@ -44,6 +44,12 @@ if (!defined('__SECURITY')) {
 
 // Read a given file
 function readFromFile ($FQFN, $sqlPrepare = false) {
+       // Sanity-check if file is there (should be there, but just to make it sure)
+       if (!isFileReadable($FQFN)) {
+               // This should not happen
+               debug_report_bug(__FUNCTION__.': File ' . basename($FQFN) . ' is not readable!');
+       } // END - if
+
        // Load the file
        if (function_exists('file_get_contents')) {
                // Use new function