WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#21922 closed defect (bug) (fixed)

Suppress SQL errors on MS blog creation check designed to fail

Reported by: bpetty Owned by: ryan
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.4.2
Component: Multisite Keywords: has-patch commit
Focuses: Cc:

Description

In install_blog(), the query that checks for posts and aborts blog creation if it finds any (since the new blog would overwrite an existing blog) is meant to fail since normally, the tables in the query shouldn't exist.

This patch changes the query to a simple DESCRIBE check, and suppresses errors from the statement that is working as designed.

Attachments (1)

21922.patch (694 bytes) - added by bpetty 9 years ago.

Download all attachments as: .zip

Change History (3)

@bpetty
9 years ago

#1 @nacin
9 years ago

  • Keywords commit added

#2 @ryan
9 years ago

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

In [21924]:

Suppress db errors when checking if the blog is already installed in install_blog(). Use DESCRIBE instead of SELECT. Props bpetty. fixes #21922

Note: See TracTickets for help on using tickets.