Rewrote 2 str_replace() calls to one with array()
[mailer.git] / inc / functions.php
index f7c2247656835dd9c582791c8f158c5b67629422..f08e83420ed3fa27698613111e3aa40f341d8442 100644 (file)
@@ -466,7 +466,7 @@ function redirectToUrl ($url, $allowSpider = TRUE) {
        // Three different ways to debug...
        //* DEBUG: */ reportBug(__FUNCTION__, __LINE__, 'URL=' . $url);
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'URL=' . $url);
-       //* DEBUG: */ die($url);
+       /* DEBUG: */ die($url);
 
        // We should not sent a redirect if headers are already sent
        if (!headers_sent()) {
@@ -2742,6 +2742,9 @@ function hashSha256 ($str) {
                $hex .= padLeftZero(dechex(ord(substr($hash, $i, 1))), 2);
        } // END - if
 
+       // Make sure 'length modulo 2' = 0
+       assert((strlen($hex) % 2) == 0);
+
        // Return it
        return $hex;
 }