]> git.mxchange.org Git - mailer.git/commitdiff
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 bed3c34916a04f6bd33c80a21738e181de978602..3b3b9b29275d1e92a89b551497c09573c01892ce 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