[wp-trac] [WordPress Trac] #56091: Using %i for table/field names in wpdb::prepare() (was: Use %i for table/field names in wpdb::prepare())
WordPress Trac
noreply at wordpress.org
Wed Sep 21 10:05:41 UTC 2022
#56091: Using %i for table/field names in wpdb::prepare()
-----------------------------+---------------------------
Reporter: craigfrancis | Owner: craigfrancis
Type: enhancement | Status: assigned
Priority: low | Milestone: 6.2
Component: Database | Version: trunk
Severity: minor | Resolution:
Keywords: has-patch early | Focuses:
-----------------------------+---------------------------
Comment (by craigfrancis):
Hi @uzumymw, and anyone who's interested, I agree with David, this patch
needs to be done carefully, and with discussion.
Just to note, "%i" will be available in 6.1 (assuming I've not made a
massive mistake somewhere), where it ensures variable identifiers (e.g.
table/field names) are escaped correctly... but this patch is about
**using** "%i" in core, and in **some** cases I think it can make the code
harder to read, for little to no benefit (I want to avoid those
situations).
I'm happy to chat about this on WP Slack, or email (craig [at]
craigfrancis [dot] co [dot] uk).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56091#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list