Skip to content

Error using 'ago' date modifier - undefined element 'seconds' in modoutputfilter.class.phph #7649

@astrodaz

Description

@astrodaz

astrodaz created Redmine issue ID 7649

Revo 2.2.1-pl
PHP 5.3.0
Apache 2.2.11

Fresh installation on Windows 7.

Error received is:

Notice: Undefined index: seconds in D:\Web\home\core\model\modx\filters\modoutputfilter.class.php on line 536

Call in the chunk is:

[[+pubdate:ago]]

Code in the php file at line 536 is:

if (empty($ago)) { /* handle <1 min */
  $ago[] = $this->modx->lexicon('ago_seconds',array('time' => $agoTS['seconds']));
}

I can see the $agoTS defined at line 504, as:

$agoTS = array(
'years' => $years,
'months' => $months,
'weeks' => $weeks,
'days' => $days,
'hours' => $hours,
'minutes' => $minutes,
'seconds' => $diff,
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-corebugThe issue in the code or project, which should be addressed.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions