Changed isset to !empty

This commit is contained in:
Jordan Stout 2011-10-14 16:25:07 -07:00
parent 81526bc7ca
commit 9fcad65c36

View File

@ -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.');
} }