Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 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 Owned by: SergeyBiryukov
Priority: normal Milestone: 3.7
Component: Network Admin Version: 3.6.1
Severity: minor Keywords:
Cc: Focuses: multisite

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
13 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status newclosed

In 25425:

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

#2 @SergeyBiryukov
13 years ago

  • Milestone Awaiting Review3.7
Note: See TracTickets for help on using tickets.