fix check for sesssion settings
authorAlan Knowles <alan@roojs.com>
Mon, 25 Jan 2021 02:58:39 +0000 (10:58 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 25 Jan 2021 02:58:39 +0000 (10:58 +0800)
DataObjects/Core_person.php

index 6483e66..1f5e791 100644 (file)
@@ -384,7 +384,7 @@ class Pman_Core_DataObjects_Core_person extends DB_DataObject
         $u = DB_DataObject::factory($this->tableName());
         $u->whereAdd(' LENGTH(passwd) > 0');
         $n = $u->count();
-        if (!is_array($_SESSION[get_class($this)])) { 
+        if (empty($_SESSION[get_class($this)]) || !is_array($_SESSION[get_class($this)])) { 
             $_SESSION[get_class($this)] = array();
         }
         $_SESSION[get_class($this)][$sesPrefix .'-empty']  = $n;