Fix for warning because of string instead of long
authorRoland Häder <roland@mxchange.org>
Fri, 12 Sep 2008 17:11:29 +0000 (17:11 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 12 Sep 2008 17:11:29 +0000 (17:11 +0000)
inc/databases.php
inc/functions.php

index 7198e10..98acd27 100644 (file)
@@ -114,7 +114,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // This current patch level
-define('CURR_SVN_REVISION', "310");
+define('CURR_SVN_REVISION', "311");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index 8b416e8..b5071b7 100644 (file)
@@ -1199,7 +1199,7 @@ function GEN_RANDOM_CODE($length, $code, $uid, $DATA="") {
        $keys   = SITE_KEY.":".DATE_KEY;
        if (isset($_CONFIG['secret_key']))  $keys .= ":".$_CONFIG['secret_key'];
        if (isset($_CONFIG['file_hash']))   $keys .= ":".$_CONFIG['file_hash'];
-       $keys .= ":".date("d-m-Y (l-F-T)", $_CONFIG['patch_ctime']);
+       $keys .= ":".date("d-m-Y (l-F-T)", bigintval($_CONFIG['patch_ctime']));
        if (isset($_CONFIG['master_salt'])) $keys .= ":".$_CONFIG['master_salt'];
 
        // Build string from misc data
@@ -1951,7 +1951,7 @@ function generateHash ($plainText, $salt = "") {
        // Do we miss an arry element here?
        if (!isset($_CONFIG['file_hash'])) {
                // Stop here
-               print(__FUNCTION__.":<pre>");
+               print("Missing file_hash in ".__FUNCTION__.". Backtrace:<pre>");
                debug_print_backtrace();
                die("</pre>");
        } // END - if
@@ -1962,7 +1962,7 @@ function generateHash ($plainText, $salt = "") {
                $server = $_SERVER['PHP_SELF'].":".getenv('HTTP_USER_AGENT').":".getenv('SERVER_SOFTWARE').":".getenv('REMOTE_ADDR').":".":".filemtime(PATH."inc/databases.php");
 
                // Build key string
-               $keys   = SITE_KEY.":".DATE_KEY.":".$_CONFIG['secret_key'].":".$_CONFIG['file_hash'].":".date("d-m-Y (l-F-T)", $_CONFIG['patch_ctime']).":".$_CONFIG['master_salt'];
+               $keys   = SITE_KEY.":".DATE_KEY.":".$_CONFIG['secret_key'].":".$_CONFIG['file_hash'].":".date("d-m-Y (l-F-T)", bigintval($_CONFIG['patch_ctime'])).":".$_CONFIG['master_salt'];
 
                // Additional data
                $data = $plainText.":".uniqid(rand(), true).":".time();