2 commits - lib/kolab_api_controller.php lib/kolab_client_task.php

Aleksander Machniak machniak at kolabsys.com
Tue Apr 23 14:30:26 CEST 2013


 lib/kolab_api_controller.php |    2 +-
 lib/kolab_client_task.php    |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit a3446015c10bec0e911fd7d8faef308e858bb6ed
Author: Aleksander Machniak <alec at alec.pl>
Date:   Tue Apr 23 14:29:50 2013 +0200

    Fix occasional "PHP Fatal error:  Call to a member function authenticated() on a non-object"

diff --git a/lib/kolab_api_controller.php b/lib/kolab_api_controller.php
index bd62778..8b9526e 100644
--- a/lib/kolab_api_controller.php
+++ b/lib/kolab_api_controller.php
@@ -259,7 +259,7 @@ class kolab_api_controller
         session_id($sess_id);
         session_start();
 
-        if (empty($_SESSION['user']) || !$_SESSION['user']->authenticated()) {
+        if (empty($_SESSION['user']) || !is_a($_SESSION['user'], 'User') || !$_SESSION['user']->authenticated()) {
             return false;
         }
 


commit 48b9a1b46dae3c395e29541aadc5636f1baf1934
Author: Aleksander Machniak <alec at alec.pl>
Date:   Tue Apr 23 14:27:27 2013 +0200

    Fix occasional "PHP Fatal error:  Call to a member function login_form() on a non-object"

diff --git a/lib/kolab_client_task.php b/lib/kolab_client_task.php
index e6df470..d11ca61 100644
--- a/lib/kolab_client_task.php
+++ b/lib/kolab_client_task.php
@@ -114,6 +114,9 @@ class kolab_client_task
 
         $skin = $this->config_get('skin', 'default');
         $this->output = new kolab_client_output($skin);
+
+        // Assign self to template variable
+        $this->output->assign('engine', $this);
     }
 
     /**
@@ -268,9 +271,6 @@ class kolab_client_task
         // Initialize locales
         $this->locale_init();
 
-        // Assign self to template variable
-        $this->output->assign('engine', $this);
-
         // Session check
         if (empty($_SESSION['user']) || empty($_SESSION['user']['token'])) {
             $this->action_logout();





More information about the commits mailing list