Ver código fonte

add check on checkForOrganizrOAuth function for db

CauseFX 3 anos atrás
pai
commit
1caa256647
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      api/classes/organizr.class.php

+ 2 - 2
api/classes/organizr.class.php

@@ -337,7 +337,7 @@ class Organizr
 	public function checkForOrganizrOAuth()
 	public function checkForOrganizrOAuth()
 	{
 	{
 		// Oauth?
 		// Oauth?
-		if ($this->user) {
+		if ($this->hasDB() && $this->user) {
 			if ($this->user['groupID'] == '999') {
 			if ($this->user['groupID'] == '999') {
 				$this->setLoggerChannel('OAuth')->debug('Starting OAuth login check');
 				$this->setLoggerChannel('OAuth')->debug('Starting OAuth login check');
 				$data = [
 				$data = [
@@ -2782,7 +2782,7 @@ class Organizr
 			}
 			}
 		}
 		}
 		$this->setAPIResponse('success', 'Config items updated', 200);
 		$this->setAPIResponse('success', 'Config items updated', 200);
-		$this->setLoggerChannel('Config')->notice('Config items updated', array_keys($updatedItems));
+		$this->setLoggerChannel('Config')->notice('Config items updated', ['items' => array_keys($updatedItems)]);
 		return (bool)$this->updateConfig($newItems);
 		return (bool)$this->updateConfig($newItems);
 	}
 	}