mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Merge branch 'master' into 2.6
This commit is contained in:
commit
4a805af5c6
3 changed files with 10 additions and 1 deletions
|
@ -597,6 +597,12 @@ class CakeTimeTest extends CakeTestCase {
|
|||
$result = $this->Time->format('Y-m-d', null, 'never');
|
||||
$this->assertEquals('never', $result);
|
||||
|
||||
$result = $this->Time->format('Y-m-d', '');
|
||||
$this->assertSame('', $result);
|
||||
|
||||
$result = $this->Time->format('Y-m-d', false);
|
||||
$this->assertSame('', $result);
|
||||
|
||||
$result = $this->Time->format('2012-01-13', '%d-%m-%Y', 'invalid');
|
||||
$this->assertEquals('13-01-2012', $result);
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* AdFixture class
|
||||
* AfterTreeFixture class
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -1053,6 +1053,9 @@ class CakeTime {
|
|||
if ($date === false && $default !== false) {
|
||||
return $default;
|
||||
}
|
||||
if ($date === false) {
|
||||
return '';
|
||||
}
|
||||
if (empty($format)) {
|
||||
$format = '%x';
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue