Merge pull request #7 from jstout24/master

Fixes exception thrown when not using user acl
This commit is contained in:
Antoine Hérault 2011-11-08 09:39:52 -08:00
commit 6aa672cd10

View File

@ -61,7 +61,7 @@ class AclAwareAmazonS3AdapterFactory implements AdapterFactoryInterface
$builder
->validate()
->always(function($v) {
if (isset($v['acl']) && isset($v['users'])) {
if (!empty($v['acl']) && !empty($v['users'])) {
throw new \Exception('"acl", and "users" cannot be set both at the same time.');
}
@ -77,7 +77,7 @@ class AclAwareAmazonS3AdapterFactory implements AdapterFactoryInterface
->prototype('array')
->validate()
->always(function($v) {
if (isset($v['group']) === isset($v['id'])) {
if (!empty($v['group']) === !empty($v['id'])) {
throw new \Exception('Either "group", or "id" must be set.');
}
@ -95,4 +95,4 @@ class AclAwareAmazonS3AdapterFactory implements AdapterFactoryInterface
->end()
;
}
}
}