diff --git a/application/utils.inc.php b/application/utils.inc.php index 6bd953ab4..45656f2cc 100644 --- a/application/utils.inc.php +++ b/application/utils.inc.php @@ -1894,7 +1894,7 @@ class utils * (re)installation of iTop (especially during development). * @return string */ - public function GetCacheBusterTimestamp() + public static function GetCacheBusterTimestamp() { if(!defined('COMPILATION_TIMESTAMP')) { diff --git a/core/userrights.class.inc.php b/core/userrights.class.inc.php index 5f56c5774..08dee7659 100644 --- a/core/userrights.class.inc.php +++ b/core/userrights.class.inc.php @@ -299,7 +299,7 @@ abstract class User extends cmdbAbstractObject { $oUser = UserRights::GetUserObject(); $oAddon = UserRights::GetModuleInstance(); - if (method_exists($oAddon, 'GetUserOrgs')) + if (!is_null($oUser) && method_exists($oAddon, 'GetUserOrgs')) { $aOrgs = $oAddon->GetUserOrgs($oUser, ''); if (count($aOrgs) > 0)