From 4025f2fb22a7093e9363b1b98fce05167f23d6e2 Mon Sep 17 00:00:00 2001 From: Mark Scherer Date: Wed, 17 Jun 2015 12:38:06 +0200 Subject: [PATCH] add cast for clarification and to allow int 0. --- lib/Cake/Utility/Validation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Utility/Validation.php b/lib/Cake/Utility/Validation.php index 3ada62684..574cf2f64 100644 --- a/lib/Cake/Utility/Validation.php +++ b/lib/Cake/Utility/Validation.php @@ -77,7 +77,7 @@ class Validation { extract(self::_defaults($check)); } - if (empty($check) && $check !== '0') { + if (empty($check) && (string)$check !== '0') { return false; } return self::_check($check, '/[^\s]+/m');