Opened 3 years ago
Closed 3 years ago
#58064 closed defect (bug) (fixed)
In the comment_time function, the call to the get_comment_time function is incorrect.
| Reported by: | tmatsuur | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.2.1 |
| Component: | Comments | Version: | 6.2 |
| Severity: | normal | Keywords: | has-patch has-unit-tests fixed-major |
| Cc: | Focuses: |
Description
The parameter $comment_id was added to the comment_time function in version 6.2, but it is not correctly passed on to the get_comment_time function called in it.
Current:
echo get_comment_time( $format, $comment_id );
Corrected content:
echo get_comment_time( $format, false, true, $comment_id );
Change History (9)
#2
@
3 years ago
Bug Report
Description
In the comment_time function, the call to the get_comment_time function is incorrect.
Environment
WordPress: 6.2
PHP: 8.0.0
Server: Apache/2.4.10 (Debian)
Database: mysqli (Server: 5.5.59-MariaDB-1~wheezy / Client: 5.5.62)
Browser: Chrome 111.0.0.0 (macOS)
Theme: Twenty Twenty-Three 1.1
MU-Plugins: None activated
Plugins:
Gutenberg 15.4.0
WordPress Beta Tester 3.3.7
Steps to Reproduce
The parameter $comment_id was added to the comment_time function in version 6.2, but it is not correctly passed on to the get_comment_time function called in it.
Current:
echo get_comment_time( $format, $comment_id );
Corrected content:
echo get_comment_time( $format, false, true, $comment_id );
Expected Results
✅ Looks good to me
Actual Results
❌ Looking forward to add this changes in 6.2.1
This ticket was mentioned in PR #4305 on WordPress/wordpress-develop by @costdev.
3 years ago
#4
- Keywords has-patch has-unit-tests added; needs-patch needs-unit-tests removed
In WordPress 6.2, the $comment_id parameter was added to the get_comment_time() and comment_time() functions.
However, comment_time() made a call to get_comment_time() with missing arguments, resulting in incorrect results.
This change adds the missing arguments to this call and includes tests.
Trac ticket: https://core.trac.wordpress.org/ticket/58064
@SergeyBiryukov commented on PR #4305:
3 years ago
#7
Thanks for the PR! Merged in r55632.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Introduced in [55287]