mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge branch 'master' into 2.6
This commit is contained in:
commit
9fd1a51a52
3 changed files with 4 additions and 3 deletions
|
@ -107,7 +107,7 @@ class Model extends Object implements CakeEventListener {
|
||||||
* The name of the primary key field for this model.
|
* The name of the primary key field for this model.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @link http://book.cakephp.org/2.0/en/models/model-attributes.html#primaryKey
|
* @link http://book.cakephp.org/2.0/en/models/model-attributes.html#primarykey
|
||||||
*/
|
*/
|
||||||
public $primaryKey = null;
|
public $primaryKey = null;
|
||||||
|
|
||||||
|
|
|
@ -1766,7 +1766,6 @@ class ValidationTest extends CakeTestCase {
|
||||||
|
|
||||||
$this->assertTrue(Validation::email('abc.efg@cakephp.org', true));
|
$this->assertTrue(Validation::email('abc.efg@cakephp.org', true));
|
||||||
$this->assertFalse(Validation::email('abc.efg@caphpkeinvalid.com', true));
|
$this->assertFalse(Validation::email('abc.efg@caphpkeinvalid.com', true));
|
||||||
$this->assertFalse(Validation::email('abc@example.abcd', true));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -200,7 +200,9 @@ if (!function_exists('h')) {
|
||||||
* @link http://book.cakephp.org/2.0/en/core-libraries/global-constants-and-functions.html#h
|
* @link http://book.cakephp.org/2.0/en/core-libraries/global-constants-and-functions.html#h
|
||||||
*/
|
*/
|
||||||
function h($text, $double = true, $charset = null) {
|
function h($text, $double = true, $charset = null) {
|
||||||
if (is_array($text)) {
|
if (is_string($text)) {
|
||||||
|
//optimize for strings
|
||||||
|
} elseif (is_array($text)) {
|
||||||
$texts = array();
|
$texts = array();
|
||||||
foreach ($text as $k => $t) {
|
foreach ($text as $k => $t) {
|
||||||
$texts[$k] = h($t, $double, $charset);
|
$texts[$k] = h($t, $double, $charset);
|
||||||
|
|
Loading…
Reference in a new issue