mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
fixes failing test cases from last CakeTime::timeAgoInWords changes
at b96eb1fb46
This commit is contained in:
parent
b96eb1fb46
commit
388e412a82
2 changed files with 2 additions and 2 deletions
|
@ -175,7 +175,7 @@ class TimeHelperTest extends CakeTestCase {
|
|||
'title' => $timestamp,
|
||||
'class' => 'time-ago-in-words'
|
||||
),
|
||||
'2 weeks',
|
||||
'in 2 weeks',
|
||||
'/div'
|
||||
);
|
||||
$this->assertTags($result, $expected);
|
||||
|
|
|
@ -891,7 +891,7 @@ class CakeTime {
|
|||
|
||||
$accuracyNum = str_replace(array('year', 'month', 'week', 'day', 'hour', 'minute', 'second'), array(1, 2, 3, 4, 5, 6, 7), $accuracy);
|
||||
|
||||
$relativeDate = [];
|
||||
$relativeDate = array();
|
||||
if ($accuracyNum >= 1 && $years > 0) {
|
||||
$relativeDate[] = __dn('cake', '%d year', '%d years', $years, $years);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue