X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffunctions.php;h=9681a3020a5f7a3b36b88aa3b41931ed41e438ed;hp=4cd8715360a4e2215763538d547bc3198d3abe2b;hb=e8ca54fe91872ab95a6ffdc4f1268bf18889021d;hpb=0544b579eb35a23bf1844a632fa7afd699d3205d diff --git a/inc/functions.php b/inc/functions.php index 4cd8715360..9681a3020a 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -261,7 +261,7 @@ function sendRawEmail ($toEmail, $subject, $message, $headers) { // Generate a password in a specified length or use default password length function generatePassword ($length = '0') { // Auto-fix invalid length of zero - if ($length == '0') $length = getConfig('pass_len'); + if ($length == '0') $length = getPassLen(); // Initialize array with all allowed chars $ABC = explode(',', 'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,0,1,2,3,4,5,6,7,8,9,-,+,_,/,.'); @@ -1705,9 +1705,7 @@ function logDebugMessage ($funcFile, $line, $message, $force=true) { $message = str_replace("\r", '', str_replace("\n", '', $message)); // Log this message away - $fp = fopen(getCachePath() . 'debug.log', 'a') or debug_report_bug(__FUNCTION__, __LINE__, 'Cannot write logfile debug.log!'); - fwrite($fp, generateDateTime(time(), '4') . '|' . getModule(false) . '|' . basename($funcFile) . '|' . $line . '|' . $message . "\n"); - fclose($fp); + appendLineToFile(getCachePath() . 'debug.log', generateDateTime(time(), '4') . '|' . getModule(false) . '|' . basename($funcFile) . '|' . $line . '|' . $message); } // END - if } @@ -2237,7 +2235,7 @@ function initCacheInstance () { $GLOBALS['cache_instance'] = new CacheSystem(); // Did it work? - if ($GLOBALS['cache_instance']->getStatus() != 'done') { + if ($GLOBALS['cache_instance']->getStatusCode() != 'done') { // Failed to initialize cache sustem addFatalMessage(__FUNCTION__, __LINE__, '(' . __LINE__ . '): {--CACHE_CANNOT_INITIALIZE--}'); } // END - if