Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#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's profile goranpejovic Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Query Keywords:
Focuses: Cc:


Hello, I made custom search form and it worked fine until the update to 3.7. Here is the page in question:

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)

#1 @goranpejovic
10 years ago

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

#2 @SergeyBiryukov
10 years ago

The warning comes from the second 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.

Last edited 10 years ago by SergeyBiryukov (previous) (diff)

#3 @SergeyBiryukov
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Going to close as a duplicate of #17737 since it's a manifestation of the same issue.

#4 @SergeyBiryukov
10 years ago

  • Version changed from 3.7.1 to 3.1

#5 @SergeyBiryukov
10 years ago

  • Component changed from General to Query

#6 @SergeyBiryukov
10 years ago

#26665 was marked as a duplicate.

Note: See TracTickets for help on using tickets.