]> git.mxchange.org Git - mailer.git/blobdiff - inc/functions.php
Introduced some wrapper functions, the extension for cache files is now .cache.php...
[mailer.git] / inc / functions.php
index f08e83420ed3fa27698613111e3aa40f341d8442..4f37ac1a92079a5d9ae6a39ed39301fc4d8391a9 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()) {
@@ -2192,6 +2192,18 @@ function convertZeroToNull ($number) {
        return $number;
 }
 
+// Converts an empty string to NULL, else leaves it untouched
+function convertEmptyToNull ($str) {
+       // Is the string empty?
+       if (strlen($str) == 0) {
+               // Is really empty
+               $str = NULL;
+       } // END - if
+
+       // Return it
+       return $str;
+}
+
 // Converts a NULL|empty string|< 1 to zero
 function convertNullToZero ($number) {
        // Is it a valid username?