Make WordPress Core

Changes between Version 1 and Version 3 of Ticket #40953


Ignore:
Timestamp:
06/08/2017 05:51:19 PM (7 years ago)
Author:
johnjamesjacoby
Comment:

In my research, all of our tests still pass if we remove the && $values[$x] !== '' bit from get_var() and nothing visibly obviously breaks. This may be because we don't test this specifically, recent improvements to charset & collation safety, or some 14 year-old secret protection that shouldn't be removed that lacks adequate documentation.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #40953 – Description

    v1 v3  
    4242The global flag ideas are attractive because they cover the entire DB stack: whether you're using the abstraction layers like `get_posts()`, `WP_Query`, or any of the other query classes, it ''just works'' all the way down the line.
    4343
    44 The settable `wpdb` flag is attractive only if you're really working with direct queries like [https://github.com/AffiliateWP/AffiliateWP/blob/master/includes/abstracts/class-db.php#L179 we are] in our custom table query classes. The same goes for a new argument in `get_col()`, though both could be implemented higher up the stack in the form of arguments or filters.
     44The settable `wpdb` flag is attractive only if you're really working with direct queries like we are in our custom table query classes. The same goes for a new argument in `get_col()`, though both could be implemented higher up the stack in the form of arguments or filters.
    4545
    4646I think a good first step here would be to try to benchmark performance for all of the listed options, just to see what we're looking at. The global flag choices seem like they could be the least impactful.