Opened 17 years ago
Closed 17 years ago
#9784 closed defect (bug) (fixed)
catchable fatal error - category template line 24
| Reported by: | johnmyr | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.8 |
| Component: | Template | Version: | 2.8 |
| Severity: | normal | Keywords: | category template, catchable fatal error |
| Cc: | Focuses: |
Description
Found a possible bug when betatesting Hybrid 0.6 theme with 2.8 bleeding.
When using the get_the_term_list() function to show a post's categories with the default (non-pretty) permalink settings, I receive this error:
Catchable fatal error: Object of class stdClass could not be converted to string in ..\wp-includes\category-template.php on line 24
Code example::
get_the_term_list( $post->ID, 'category', 'Posted in', ', ', '' );
Change History (3)
#1
@
17 years ago
- Component General → Template
- Milestone → 2.8
- Resolution → worksforme
- Status new → closed
#2
@
17 years ago
- Resolution worksforme
- Status closed → reopened
Fails miserably in Kubrick for me too.
Step by step:
1) Set your permalinks to the default: http://localhost/?p=123.
2) Add this code within The Loop in index.php:
<?php echo get_the_term_list( $post->ID, 'category', 'Posted in ', ', ', '' ); ?>
This error is produced:
Catchable fatal error: Object of class stdClass could not be converted to string in C:\xampp\htdocs\wp-includes\category-template.php on line 24
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
works fine in kubrick. please re-open with a step by step procedure to reproduce.