r4137 bugfix: notice message 'Undefined variable: _SESSION' was appearing in errorlog
authorAlexey Andriyanov <alan@al-an.info>
Sun, 16 Jan 2011 09:39:48 +0000 (09:39 +0000)
committerAlexey Andriyanov <alan@al-an.info>
Sun, 16 Jan 2011 09:39:48 +0000 (09:39 +0000)
clearMessages: added check for defined before unsetting.

inc/functions.php

index f8abb41..a2395b3 100644 (file)
@@ -4426,7 +4426,8 @@ function setMessage ($message, $type, $direct_rendering)
 // clear message list set by showError, its siblings, buildWideRedirectURL
 function clearMessages()
 {
-       unset ($_SESSION['log']);
+       if (isset ($_SESSION['log']))
+               unset ($_SESSION['log']);
 }
 
 function isEthernetPort($port)