fixes Notice in TestServer if 'login' section does not exist
authorPhilipp Schüle <p.schuele@metaways.de>
Wed, 7 May 2014 16:03:54 +0000 (18:03 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 7 May 2014 16:25:40 +0000 (18:25 +0200)
Change-Id: Ic06cf5ec2e53a2eed2b983baf026634e15a71bf7
Reviewed-on: http://gerrit.tine20.com/customers/607
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tests/tine20/TestServer.php

index 43209de..cb85d8a 100644 (file)
@@ -260,8 +260,8 @@ class TestServer
     {
         $tinebaseController = Tinebase_Controller::getInstance();
         $config = $this->getConfig();
-        $username = $config->login->username ? $config->login->username : $config->username;
-        $password = $config->login->password ? $config->login->password : $config->password;
+        $username = isset($config->login->username) ? $config->login->username : $config->username;
+        $password = isset($config->login->password) ? $config->login->password : $config->password;
         $ip = $config->ip ? $config->ip : '127.0.0.1';
         if (! $tinebaseController->login($username, $password, $ip, 'TineUnittest')){
             throw new Exception("Couldn't login, user session required for tests! \n");