#35588 closed enhancement (fixed)
$wpdb->db_version() wrongly documented
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.5 | Priority: | normal |
Severity: | normal | Version: | 2.7 |
Component: | Database | Keywords: | |
Focuses: | Cc: |
Description
The comment of db_version () function is false.
This function returns the version of MySQL, not the version of the database as specified in the source files.
<?php /** * The database version number. * * @since 2.7.0 * * @return null|string Null on failure, version number on success. */ public function db_version() { if ( $this->use_mysqli ) { $server_info = mysqli_get_server_info( $this->dbh ); } else { $server_info = mysql_get_server_info( $this->dbh ); } return preg_replace( '/[^0-9.].*/', '', $server_info ); }
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
In 36385: