From 30986f637cd3c03951bdbfc880b9a420f7724ce0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 6 Jun 2009 21:35:11 +0000 Subject: [PATCH] Sanity check added to make sure the file is really there --- inc/wrapper-functions.php | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.39.2