commit d95206a6ee66de78f3db256005d1a90e067ab452
parent 25f90c6900134bd36e917cb89d9225fce6f346ef
Author: finwo <finwo@pm.me>
Date: Fri, 6 May 2016 15:52:04 +0200
Bugfix
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PropertyAccessor.php b/src/PropertyAccessor.php
@@ -24,7 +24,7 @@ class PropertyAccessor
public function getSafe(&$subject, $path = '', $pathSplit = '|', $default = null, $options = array())
{
$result = $this->get($subject, $path, $pathSplit);
- if (in_array($result, $options) || is_null($result)) {
+ if ( !in_array($result, $options) || is_null($result) ) {
$result = &$default;
}
return $result;