Make WordPress Core

Opened 6 months ago

Closed 6 months ago

#64005 closed defect (bug) (fixed)

Cast the Non_unique to a string before checking it

Reported by: tsteel's profile tsteel Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.9 Priority: normal
Severity: major Version: 6.8.2
Component: Database Keywords:
Focuses: Cc:

Description

We're piping our queries through Doctrine DBAL which casts Non_unique to an integer (which it should be). However, when the dbDelta function runs it specifically checks for a string and it fails.

Change History (4)

This ticket was mentioned in PR #9954 on WordPress/wordpress-develop by trsteel88.


6 months ago
#1

  • Keywords has-patch added

Trac ticket: https://core.trac.wordpress.org/ticket/64005#ticket

This change ensures the Non_unique is always cast to the type expected (string)

#3 @SergeyBiryukov
6 months ago

  • Component changed from General to Database
  • Milestone changed from Awaiting Review to 6.9
  • Owner set to SergeyBiryukov
  • Status changed from new to accepted

#4 @SergeyBiryukov
6 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 60784:

Database: Ensure Non_unique index value is compared as a string in dbDelta().

Follow-up to [1575], [58994].

Props tsteel.
Fixes #64005.

Note: See TracTickets for help on using tickets.