Merge branch 'master' into 2.6

This commit is contained in:
mark_story 2014-07-10 14:39:32 -04:00
commit 9fd1a51a52
3 changed files with 4 additions and 3 deletions

View file

@ -107,7 +107,7 @@ class Model extends Object implements CakeEventListener {
* The name of the primary key field for this model.
*
* @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;

View file

@ -1766,7 +1766,6 @@ class ValidationTest extends CakeTestCase {
$this->assertTrue(Validation::email('abc.efg@cakephp.org', true));
$this->assertFalse(Validation::email('abc.efg@caphpkeinvalid.com', true));
$this->assertFalse(Validation::email('abc@example.abcd', true));
}
/**

View file

@ -200,7 +200,9 @@ if (!function_exists('h')) {
* @link http://book.cakephp.org/2.0/en/core-libraries/global-constants-and-functions.html#h
*/
function h($text, $double = true, $charset = null) {
if (is_array($text)) {
if (is_string($text)) {
//optimize for strings
} elseif (is_array($text)) {
$texts = array();
foreach ($text as $k => $t) {
$texts[$k] = h($t, $double, $charset);