WordPress.org

Make WordPress Core

Opened 11 years ago

Closed 10 years ago

#11804 closed defect (bug) (duplicate)

Object Access Violation in repair.php and is_blog_installed()

Reported by: hakre Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: General Keywords: has-patch tested
Focuses: Cc:

Description

On line 36 in /wp-admin/maint/repair.php the global $wpdb of type wpdb is accessing the following private member: wpdb::$old_tables. That member has been defined with @access private. The code must reflect that.

There is an additional access violation in the same script by accessing the private tables member.

The errors were introduced in [11902] by ryan. wpdb should offer a public member to check for deprecated tables.

Related: #11799

Attachments (3)

11804-tests.php (610 bytes) - added by hakre 11 years ago.
testcases
11804.patch (1.6 KB) - added by hakre 11 years ago.
The actual patch.
11804-is_blog_installed.patch (751 bytes) - added by hakre 11 years ago.
Another access violation in is_blog_installed() in /wp-includes/functions.php.

Download all attachments as: .zip

Change History (7)

@hakre
11 years ago

testcases

#1 @hakre
11 years ago

Patch Info
Patch adds an additional public member to class wpdb that provides the needed data. additionally it saves some function calls in repair.php because the list of table names is already filtered prior to iterate it.

Test-Results

Old-Test
Result: OK
All-Test
Result: OK
Current-Test
Result: OK
Default-Test
Result: OK

@hakre
11 years ago

The actual patch.

@hakre
11 years ago

Another access violation in is_blog_installed() in /wp-includes/functions.php.

#2 @hakre
11 years ago

Found another one in is_blog_installed(). Precisely spoken, that function might not look for all but only for current tables and skip the deprecated ones here. Just as a sidenote.

#3 @hakre
11 years ago

  • Summary changed from Object Access Violation in repair.php to Object Access Violation in repair.php and is_blog_installed()

#4 @nacin
10 years ago

  • Milestone 3.0 deleted
  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.