[wp-trac] [WordPress Trac] #42362: WordPress database error Unknown column 'wp_mywordpresssite' in 'field list'

WordPress Trac noreply at wordpress.org
Mon Aug 1 17:12:20 UTC 2022


#42362: WordPress database error Unknown column 'wp_mywordpresssite' in 'field
list'
------------------------------------------------+--------------------------
 Reporter:  lazam786                            |       Owner:
                                                |  SergeyBiryukov
     Type:  defect (bug)                        |      Status:  reviewing
 Priority:  normal                              |   Milestone:  Future
                                                |  Release
Component:  Database                            |     Version:  4.6
 Severity:  normal                              |  Resolution:
 Keywords:  php8 php81 has-patch needs-testing  |     Focuses:
------------------------------------------------+--------------------------

Comment (by deksar):

 Replying to [comment:41 SergeyBiryukov]:
 > Replying to [comment:34 maythamalsudany]:
 > > What is the purpose of `SELECT $prefix` in wp-admin/setup-
 config.php:317?
 >
 > The purpose is to disallow table prefixes that would cause a syntax
 error, see [37581] / #36422.
 >
 > There is some more context in comment:20:
 > > We want this error to be triggered (it proves that it's an appropriate
 table prefix), but we don't want it to be displayed at all.
 >
 > [41631] / #40655 was supposed to silently discard the error, but appears
 to not always work as expected.
 >
 > [attachment:"42362.2.diff"] refreshes the patch, testing would be
 appreciated.

 I have just tested the patch, it solved the problem, no more errors.
 Test environment: PHP 8.0.20
 WordPress 6.0.1

 Thanks.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/42362#comment:42>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list