Skip to content
Permalink
Browse files

Always use strict string comparison to avoid false positives.

  • Loading branch information...
dereuromark committed Sep 27, 2015
1 parent 04d5be3 commit 1e505b8acd27b126c661922387a7ae44c6a3584b
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/Database/Driver.php
  2. +2 −2 src/Validation/Validation.php
@@ -249,7 +249,7 @@ public function schemaValue($value)
}
if ((is_int($value) || $value === '0') || (
is_numeric($value) && strpos($value, ',') === false &&
$value[0] != '0' && strpos($value, 'e') === false)
$value[0] !== '0' && strpos($value, 'e') === false)
) {
return $value;
}
@@ -86,7 +86,7 @@ public static function notBlank($check)
extract(static::_defaults($check));
}
if (empty($check) && $check != '0') {
if (empty($check) && $check !== '0') {
return false;
}
return static::_check($check, '/[^\s]+/m');
@@ -109,7 +109,7 @@ public static function alphaNumeric($check)
extract(static::_defaults($check));
}
if (empty($check) && $check != '0') {
if (empty($check) && $check !== '0') {
return false;
}
return self::_check($check, '/^[\p{Ll}\p{Lm}\p{Lo}\p{Lt}\p{Lu}\p{Nd}]+$/Du');

0 comments on commit 1e505b8

Please sign in to comment.
You can’t perform that action at this time.