Opened 12 years ago
Closed 12 years ago
#28941 closed defect (bug) (invalid)
CPT slug crashes a query because it has the word 'for' in it?
| Reported by: | perthmetro | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 3.9.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
See my WP support forum post below
Basically, in the code i provided if the word "for" is part of a CPT slug and separated by hyphens (property-for-sale) then the word "for" is picked up as php code and screws up the query. Notepad++ also picks it up as php.
I know very little about php but I think i'm on to something here.
Change History (2)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
it is fixed if the slug is bracketed by a '
e.g.
'post_type' => property-something-sale, works ?why
'post_type' => property-for-sale, crashes
'post_type' => 'property-for-sale', works