[wp-trac] [WordPress Trac] #27933: MYSQL_NEW_LINK constant is not honored with MySQLi
WordPress Trac
noreply at wordpress.org
Mon Apr 21 00:21:32 UTC 2014
#27933: MYSQL_NEW_LINK constant is not honored with MySQLi
--------------------------+--------------------
Reporter: doublesharp | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.9.1
Component: Database | Version: 3.9
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+--------------------
Comment (by pento):
For the `version_compare()` call, putting the operator in the function
call would make it more readable:
`version_compare( PHP_VERSION, '5.3.0', '>=' )`
For consistency with the other PHP version check in `wpdb`, I'd use
`phpversion()` instead of `PHP_VERSION`.
I like the warning, though instead of the `WP_DEBUG` check, you can just
do a `_doing_it_wrong()` call instead:
{{{
} else {
_doing_it_wrong( 'wpdb::db_connect', __( 'Disabling MYSQL_NEW_LINK
with MySQLi requires PHP 5.3 or later' ), '3.9.1' );
}
}}}
(I'm not wild about that particular error message, @DrewAPicture, do you
have some thoughts on this?)
And for a minor coding standard reminder, don't forget your
[https://make.wordpress.org/core/handbook/coding-standards/php/#space-
usage whitespace].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27933#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list