From: Roland Häder Date: Sat, 6 Jun 2009 21:35:11 +0000 (+0000) Subject: Sanity check added to make sure the file is really there X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=30986f637cd3c03951bdbfc880b9a420f7724ce0;p=mailer.git Sanity check added to make sure the file is really there --- diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index bed3c34916..3b3b9b2927 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -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