[wp-trac] [WordPress Trac] #51988: Call to undefined function mysql_connect()

WordPress Trac noreply at wordpress.org
Wed Dec 9 20:35:25 UTC 2020


#51988: Call to undefined function mysql_connect()
--------------------------+-----------------------
 Reporter:  bgin          |       Owner:  (none)
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  5.6.1
Component:  Database      |     Version:  5.6
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+-----------------------
Changes (by SergeyBiryukov):

 * status:  closed => reopened
 * resolution:  invalid =>
 * milestone:   => 5.6.1


Comment:

 Replying to [comment:6 desrosj]:
 > As of the release of PHP 8, the `@` operator will no longer suppress
 errors fatal errors.
 >
 > Looking at [https://core.trac.wordpress.org/browser/tags/5.6/src/wp-
 includes/wp-db.php#L1684 the code in WordPress], unless `WP_DEBUG` mode is
 enabled, the `@` operator preceded the `mysql_connect()` call. In previous
 versions of PHP, it's likely that this just failed silently, and just
 happened to work on accident.

 Since the error is now more prominent with PHP 8, I think we could display
 a better error message here for clarity, with some action items for the
 user to check, and a link to support forums.

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


More information about the wp-trac mailing list