Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#28744 closed defect (bug) (fixed)

setup-config.php Fatal error: Cannot redeclare add_filter()

Reported by: michalzuber Owned by: nacin
Priority: normal Milestone: 4.0
Component: Upgrade/Install Version: 4.0
Severity: normal Keywords:
Cc: Focuses: administration

Description

Without wp-config.php I get
Fatal error: Cannot redeclare add_filter() (previously declared in /Volumes/data/Sites/wp_git/wp-includes/plugin.php:82) in /Volumes/data/Sites/wp_git/wp-includes/plugin.php on line 89

Attachments (1)

setup-config.patch​ (916 bytes ) - added by michalzuber 12 years ago.

Download all attachments as: .zip

Change History (5)

#1 @michalzuber
12 years ago

Issue is in wp-settings.php on line 75 there's only require. It conflicts with wp-admin/setup-config.php:33

#2 @SergeyBiryukov
12 years ago

  • Component General → Upgrade/Install
  • Milestone Awaiting Review → 4.0

Confirmed. See [28978].

With setup-config.patch​, wp_load_translations_early() never fires, it's added too late.

I guess we need to change require() to require_once() in wp-settings.php.

#3 @nacin
12 years ago

Weird. I thought this was already a require_once(), and it was working for me. Turns out it was due to a buggy opcode cache. (This was less than fun to track down.)

#4 @nacin
12 years ago

  • Owner set to nacin
  • Resolution → fixed
  • Status new → closed

In 29005:

Don't include plugin.php twice in setup-config.php.

fixes #28744. see #28740, [28978].

Note: See TracTickets for help on using tickets.