Explorar o código

Do not validate default option values, assume that default values are correct.

Daniele Alessandri %!s(int64=14) %!d(string=hai) anos
pai
achega
21ac9b06f5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/Predis/Options/Option.php

+ 1 - 1
lib/Predis/Options/Option.php

@@ -12,6 +12,6 @@ class Option implements IOption {
     }
 
     public function __invoke($value) {
-        return $this->validate(isset($value) ? $value : $this->getDefault());
+        return isset($value) ? $this->validate($value) : $this->getDefault();
     }
 }