WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#3759 closed defect (bug) (fixed)

Search Engine Space Bug

Reported by: specialkitty Owned by:
Milestone: 2.1.2 Priority: low
Severity: major Version: 2.1
Component: General Keywords:
Focuses: Cc:

Description

If you search for just a space using wordpress 2.1 you get the following DB error:

WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND (post_type = 'post' AND (post_status = 'publish' OR post_status = 'privat' at line 1]
SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts WHERE 1=1 AND () AND (post_type = 'post' AND (post_status = 'publish' OR post_status = 'private')) ORDER BY post_date DESC LIMIT 0, 25

Attachments (1)

query.php.diff (447 bytes) - added by priv 7 years ago.
trim before test empty of the search string

Download all attachments as: .zip

Change History (7)

comment:1 foolswisdom7 years ago

  • Severity changed from normal to major

Probably relates to #3722

comment:2 foolswisdom7 years ago

  • Version set to 2.1

priv7 years ago

trim before test empty of the search string

comment:3 priv7 years ago

Sorry I missed the similar problem.

This problem would be gone with the fix in #3722, that fix would be more general.

comment:4 Nazgul7 years ago

  • Milestone changed from 2.1.1 to 2.1.2

comment:5 ryan7 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [4911]) Handle empty search query. Props charleshooper. fixes #3722 #3759

comment:6 ryan7 years ago

(In [4912]) Handle empty search query. Props charleshooper. fixes #3722 #3759

Note: See TracTickets for help on using tickets.