fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [15565] booking: do not auth on empty object


From: sigurdne
Subject: [Fmsystem-commits] [15565] booking: do not auth on empty object
Date: Fri, 2 Sep 2016 10:22:14 +0000 (UTC)

Revision: 15565
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15565
Author:   sigurdne
Date:     2016-09-02 10:22:13 +0000 (Fri, 02 Sep 2016)
Log Message:
-----------
booking: do not auth on empty object

Modified Paths:
--------------
    trunk/booking/inc/class.bocommon_authorized.inc.php

Modified: trunk/booking/inc/class.bocommon_authorized.inc.php
===================================================================
--- trunk/booking/inc/class.bocommon_authorized.inc.php 2016-09-02 08:09:20 UTC 
(rev 15564)
+++ trunk/booking/inc/class.bocommon_authorized.inc.php 2016-09-02 10:22:13 UTC 
(rev 15565)
@@ -776,7 +776,14 @@
                function read_single( $id )
                {
                        $entity = parent::read_single($id);
-                       $this->authorize_read($entity);
-                       return $this->add_permission_data($entity);
+                       if($entity)
+                       {
+                               $this->authorize_read($entity);
+                               return $this->add_permission_data($entity);
+                       }
+                       else
+                       {
+                               return array();
+                       }
                }
        }
\ No newline at end of file




reply via email to

[Prev in Thread] Current Thread [Next in Thread]