Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#25301 closed defect (bug) (fixed)

Warning when displaying a Drop-in whose Constant is not defined in wp-config.php

Reported by: adiant's profile adiant Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 3.7 Priority: normal
Severity: minor Version: 3.6.1
Component: Network Admin Keywords:
Focuses: multisite Cc:

Description

"Warning: constant(): Couldn't find constant SUNRISE in C:\xampp\htdocs\wpnet\wp-admin\includes\class-wp-plugins-list-table.php on line 324"
is displayed on /wp-admin/network/plugins.php?plugin_status=dropins when a Drop-in is present in /wp-content/ but wp-config.php does not DEFINE its constant.

Suggested resolution:

Prefix constant() function with @ in line 324 of /wp-admin/includes/class-wp-plugins-list-table.php as shown:

} elseif ( @constant( $dropins[ $plugin_file ][1] ) ) { // Constant is true

Change History (2)

#1 @SergeyBiryukov
11 years ago

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

In 25425:

Avoid a PHP warning in network admin if a constant corresponding to a drop-in is not defined. fixes #25301.

#2 @SergeyBiryukov
11 years ago

  • Milestone changed from Awaiting Review to 3.7
Note: See TracTickets for help on using tickets.