// Trim value and session variable
$var = trim(secureString($var));
- $value = trim($value);
+
+ // Is the value no array?
+ if (!is_array($value)) {
+ // Then trim it
+ $value = trim($value);
+ } // END - if
// Is the session variable set?
- if (('' . $value . '' == '') && (isSessionVariableSet($var))) {
+ if ((!is_array($value)) && ('' . $value . '' == '') && (isSessionVariableSet($var))) {
// Remove the session
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'UNSET:' . $var . '=' . getSession($var));
unset($_SESSION[$var]);
// PHP version < 5.3.0
return session_unregister($var);
}
- } elseif (('' . $value . '' != '') && (!isSessionVariableSet($var))) {
+ } elseif ((is_array($value)) || (('' . $value . '' != '') && (!isSessionVariableSet($var)))) {
// Set session
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'SET:' . $var . '=' . $value);
$_SESSION[$var] = $value;