Fix for latest PHP 5.4.x changes
[mailer.git] / inc / wrapper-functions.php
index c86787ebc2aa0b1bd191896f4dd6b9c1fe288806..5195c0c1e7c716abe6bffe17f24367b875cb2994 100644 (file)
@@ -540,12 +540,12 @@ function isNicknameUsed ($userid) {
 }
 
 // Getter for 'what' value
-function getWhat () {
+function getWhat ($strict = true) {
        // Default is null
        $what = NULL;
 
        // Is the value set?
-       if (isWhatSet(true)) {
+       if (isWhatSet($strict)) {
                // Then use it
                $what = $GLOBALS['__what'];
        } // END - if
@@ -1232,6 +1232,12 @@ function getTotalRandomRefidUser () {
 
 // Is given userid valid?
 function isValidUserId ($userid) {
+       // Handle NULL
+       if (is_null($userid)) {
+               // Do not handle this as of below isset() will always return false
+               return false;
+       } // END - if
+
        // Do we have cache?
        if (!isset($GLOBALS[__FUNCTION__][$userid])) {
                // Check it out