@@ -194,7 +194,8 @@ public function findAcls(array $oids, array $sids = array())
194
194
foreach ($ oids as $ oid ) {
195
195
if (!$ result ->contains ($ oid )) {
196
196
if (1 === count ($ oids )) {
197
- throw new AclNotFoundException (sprintf ('No ACL found for %s. ' , $ oid ));
197
+ $ objectName = method_exists ($ oid , '__toString ' ) ? $ oid : get_class ($ oid );
198
+ throw new AclNotFoundException (sprintf ('No ACL found for %s. ' , $ objectName ));
198
199
}
199
200
200
201
$ partialResultException = new NotAllAclsFoundException ('The provider could not find ACLs for all object identities. ' );
@@ -283,7 +284,8 @@ protected function getAncestorLookupSql(array $batch)
283
284
if (1 === count ($ types )) {
284
285
$ ids = array ();
285
286
for ($ i = 0 ; $ i < $ count ; $ i ++) {
286
- $ ids [] = $ this ->connection ->quote ($ batch [$ i ]->getIdentifier ());
287
+ $ identifier = (string ) $ batch [$ i ]->getIdentifier ();
288
+ $ ids [] = $ this ->connection ->quote ($ identifier );
287
289
}
288
290
289
291
$ sql .= sprintf (
@@ -325,17 +327,17 @@ protected function getFindChildrenSql(ObjectIdentityInterface $oid, $directChild
325
327
$ query = <<<FINDCHILDREN
326
328
SELECT o.object_identifier, c.class_type
327
329
FROM
328
- {$ this ->options ['oid_table_name ' ]} as o
329
- INNER JOIN {$ this ->options ['class_table_name ' ]} as c ON c.id = o.class_id
330
- INNER JOIN {$ this ->options ['oid_ancestors_table_name ' ]} as a ON a.object_identity_id = o.id
330
+ {$ this ->options ['oid_table_name ' ]} o
331
+ INNER JOIN {$ this ->options ['class_table_name ' ]} c ON c.id = o.class_id
332
+ INNER JOIN {$ this ->options ['oid_ancestors_table_name ' ]} a ON a.object_identity_id = o.id
331
333
WHERE
332
334
a.ancestor_id = %d AND a.object_identity_id != a.ancestor_id
333
335
FINDCHILDREN ;
334
336
} else {
335
337
$ query = <<<FINDCHILDREN
336
338
SELECT o.object_identifier, c.class_type
337
- FROM {$ this ->options ['oid_table_name ' ]} as o
338
- INNER JOIN {$ this ->options ['class_table_name ' ]} as c ON c.id = o.class_id
339
+ FROM {$ this ->options ['oid_table_name ' ]} o
340
+ INNER JOIN {$ this ->options ['class_table_name ' ]} c ON c.id = o.class_id
339
341
WHERE o.parent_object_identity_id = %d
340
342
FINDCHILDREN ;
341
343
}
@@ -363,8 +365,8 @@ protected function getSelectObjectIdentityIdSql(ObjectIdentityInterface $oid)
363
365
$ query ,
364
366
$ this ->options ['oid_table_name ' ],
365
367
$ this ->options ['class_table_name ' ],
366
- $ this ->connection ->quote ($ oid ->getIdentifier ()),
367
- $ this ->connection ->quote ($ oid ->getType ())
368
+ $ this ->connection ->quote (( string ) $ oid ->getIdentifier ()),
369
+ $ this ->connection ->quote (( string ) $ oid ->getType ())
368
370
);
369
371
}
370
372
@@ -419,8 +421,8 @@ private function getAncestorIds(array $batch)
419
421
$ ancestorIds = array ();
420
422
foreach ($ this ->connection ->executeQuery ($ sql )->fetchAll () as $ data ) {
421
423
// FIXME: skip ancestors which are cached
422
-
423
- $ ancestorIds [] = $ data[ ' ancestor_id ' ] ;
424
+ // Fix: Oracle returns keys in uppercase
425
+ $ ancestorIds [] = reset ( $ data) ;
424
426
}
425
427
426
428
return $ ancestorIds ;
@@ -524,7 +526,7 @@ private function hydrateObjectIdentities(Statement $stmt, array $oidLookup, arra
524
526
$ auditSuccess ,
525
527
$ auditFailure ,
526
528
$ username ,
527
- $ securityIdentifier ) = $ data ;
529
+ $ securityIdentifier ) = array_values ( $ data) ;
528
530
529
531
// has the ACL been hydrated during this hydration cycle?
530
532
if (isset ($ acls [$ aclId ])) {
0 commit comments