mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Applying patch by rnowotniak, fixes #5523
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7706 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
b5473a5f9b
commit
38bc438fc7
2 changed files with 15 additions and 1 deletions
|
@ -139,7 +139,7 @@ class Validation extends Object {
|
||||||
if (empty($_this->check) && $_this->check != '0') {
|
if (empty($_this->check) && $_this->check != '0') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$_this->regex = '/[^\s]+/mu';
|
$_this->regex = '/[^\s]+/m';
|
||||||
return $_this->_check();
|
return $_this->_check();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -69,6 +69,20 @@ class ValidationTestCase extends CakeTestCase {
|
||||||
function setup() {
|
function setup() {
|
||||||
$this->Validation =& Validation::getInstance();
|
$this->Validation =& Validation::getInstance();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* testNotEmpty method
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function testNotEmpty() {
|
||||||
|
$this->assertTrue(Validation::notEmpty('abcdefg'));
|
||||||
|
$this->assertTrue(Validation::notEmpty('fasdf '));
|
||||||
|
$this->assertTrue(Validation::notEmpty('fooo'.chr(243).'blabla'));
|
||||||
|
|
||||||
|
$this->assertFalse(Validation::notEmpty("\t "));
|
||||||
|
$this->assertFalse(Validation::notEmpty(""));
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* testAlphaNumeric method
|
* testAlphaNumeric method
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue