Skip to content

serendipity_smarty_formatTime forwards $format when null, leads to error #946

@onli

Description

@onli

See https://board.s9y.org/viewtopic.php?t=27388.

function serendipity_smarty_formatTime($timestamp, $format, $useOffset = true, $detectTimestamp = false, $useDate = false) {
has a check if (defined($format)) {, but if it fails happily calls serendipity_formatTime($format, ...) also when $format is set to null. That's a problem when the subsequent call to PHP81_BC\\strftime() in serendipity_strftime will die because of $format still being null.

Possible solution: Let serendipity_smarty_formatTime set a default format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions