pgsql - enforce role membership array to contain strings
authorPaul Mehrer <p.mehrer@metaways.de>
Mon, 19 Jun 2017 13:15:01 +0000 (15:15 +0200)
committerPaul Mehrer <p.mehrer@metaways.de>
Tue, 20 Jun 2017 11:47:39 +0000 (13:47 +0200)
Change-Id: I24049b75d947c514442ab4310fe339a268da0aad
Reviewed-on: http://gerrit.tine20.com/customers/4898
Reviewed-by: Paul Mehrer <p.mehrer@metaways.de>
Tested-by: Paul Mehrer <p.mehrer@metaways.de>
tine20/Tinebase/Container.php

index 0df1775..9514a0a 100644 (file)
@@ -710,6 +710,8 @@ class Tinebase_Container extends Tinebase_Backend_Sql_Abstract implements Tineba
 
         $groupMemberships   = Tinebase_Group::getInstance()->getGroupMemberships($accountId);
         $roleMemberships    = Tinebase_Acl_Roles::getInstance()->getRoleMemberships($accountId);
+        // enforce string for pgsql
+        array_walk($roleMemberships, function(&$item) {$item = (string)$item;});
         
         $quotedActId   = $db->quoteIdentifier("{$_aclTableName}.account_id");
         $quotedActType = $db->quoteIdentifier("{$_aclTableName}.account_type");