getCreatedTime returns string instead of integer

Created on 7 June 2024, 18 days ago
Updated 13 June 2024, 12 days ago

Problem/Motivation

The phpdocs of getCreatedTime mention that the timestamp will be returned as integer. While it is currently returning a string.
This leads to bugs when you do strict comparison with the changed time which is correctly returning an integer.

Steps to reproduce

if ($comment->getCreatedTime() !== $comment->getChangedTime()) {
  // Statement is always true
}

Proposed resolution

Convert the value to int, just like all other timestamp methods.

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
CommentΒ  β†’

Last updated about 15 hours ago

Created by

πŸ‡§πŸ‡ͺBelgium nils.destoop

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024