Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#37815 closed defect (bug) (duplicate)

PHP Notice: Undefined variable: collate

Reported by: Hax Owned by:
Priority: normal Milestone:
Component: Database Version: 4.7
Severity: normal Keywords:
Cc: Focuses:

Description

Since the $collate is not defined.

If the none of the conditions are met the $collate variable is never set. This issue could also affect $charset. I am not getting a php notice for $charset just yet only for $collate.

https://core.trac.wordpress.org/browser/trunk/src/wp-includes/wp-db.php#L752

Change History (3)

#1 @kraftbj
10 years ago

There's no default option for $charset or $collate in that section if the defined( 'DB_COLLATE') check fails. I believe the expectation is that should be set in wp-config.php (and is by default).

#2 @Hax
10 years ago

yes, but the variables should still be set, either to Null or empty string. The notice is that the variables are not set.

Version 0, edited 10 years ago by Hax (next)

#3 @SergeyBiryukov
10 years ago

  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed

Thanks for the report, we're already tracking this issue in #37683.

Note: See TracTickets for help on using tickets.