[wp-trac] [WordPress Trac] #33929: Wrong data type for several variables holding a wpdb query result

WordPress Trac noreply at wordpress.org
Sat Sep 19 16:27:27 UTC 2015


#33929: Wrong data type for several variables holding a wpdb query result
--------------------------+-----------------------------
 Reporter:  tfrommen      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Just like in #32876, there are several situations where the result of
 `$wpdb->get_var()` is used as is (which is a `string`), and yet data type
 is said to be `int`. The individual situations include `apply_filters()`
 calls, function return values, and class properties, i.e., only ''non-
 local'' usage.

 Please find the attached patch that takes care of that.
 In one case I also adapted two conditionals using a
 former-`string/null`-now-`int`-value.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33929>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list