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)
#2
@
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
(next)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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).