Merge pull request #7 from jstout24/master
Fixes exception thrown when not using user acl
This commit is contained in:
commit
6aa672cd10
|
@ -61,7 +61,7 @@ class AclAwareAmazonS3AdapterFactory implements AdapterFactoryInterface
|
||||||
$builder
|
$builder
|
||||||
->validate()
|
->validate()
|
||||||
->always(function($v) {
|
->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.');
|
throw new \Exception('"acl", and "users" cannot be set both at the same time.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ class AclAwareAmazonS3AdapterFactory implements AdapterFactoryInterface
|
||||||
->prototype('array')
|
->prototype('array')
|
||||||
->validate()
|
->validate()
|
||||||
->always(function($v) {
|
->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.');
|
throw new \Exception('Either "group", or "id" must be set.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,4 +95,4 @@ class AclAwareAmazonS3AdapterFactory implements AdapterFactoryInterface
|
||||||
->end()
|
->end()
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user