diff --git a/Validation/Validator.php b/Validation/Validator.php index ff49c0242..cbf76f938 100644 --- a/Validation/Validator.php +++ b/Validation/Validator.php @@ -113,7 +113,7 @@ final class Validator extends ValidatorAbstract */ public static function contains(string $var, $substr) { - return is_string($substr) ? strpos($var, $substr) : StringUtils::contains($var, $substr); + return is_string($substr) ? strpos($var, $substr) !== false : StringUtils::contains($var, $substr); } /** diff --git a/Views/View.php b/Views/View.php index daaa6ad86..d2792a5d5 100644 --- a/Views/View.php +++ b/Views/View.php @@ -365,7 +365,7 @@ class View implements \Serializable { $viewArray = []; - if($this->template === '') { + if($this->template !== '') { $viewArray[] = $this->render(); }