#26308 closed defect (bug) (duplicate)
After the update from 3.5 to 3.7 I get Warning: preg_split() expects parameter 2 to be string, array given on search
Reported by: | goranpejovic | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.1 |
Component: | Query | Keywords: | |
Focuses: | Cc: |
Description
Hello, I made custom search form and it worked fine until the update to 3.7. Here is the page in question: http://www.realestate.studio-morpheus.com/listings/?rentbuy=1&location%5B%5D=kotor&location%5B%5D=podgorica&property-type=&areamin=&areamax=&pricelow=&pricehigh=&site_section=listings
I am using GETs to send the search data and the one where I use array gives the error, other fields don't give the error. Furthermore the search works it just spits the warning and sets page title to 404.
Change History (6)
#2
@
11 years ago
The warning comes from the secong preg_split()
in the custom taxonomy handling block in WP_Query::parse_tax_query()
: tags/3.7.1/src/wp-includes/query.php#L1738.
Doesn't appear to be a regression. The code was introduced in [15613], modified in [15731], [15732], [15860], [15874], and [16259].
The patch on #17737 solves the issue by discarding a custom taxonomy query var if it's an array instead of a string.
The error the page throws this error: Warning: preg_split() expects parameter 2 to be string, array given in /home/studiom4/public_html/realestate/wp-includes/query.php on line 1763