WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#11419 closed defect (bug) (fixed)

r12389 changes a piece of logic, no?

Reported by: Denis-de-Bernardy Owned by: westi
Milestone: 2.9 Priority: normal
Severity: normal Version: 2.9
Component: General Keywords:
Focuses: Cc:

Description

should r12389 read something like:

if ( isset($user_id) && $user_id ) {

?

Change History (2)

#1 @westi
10 years ago

$user_id if set should always be a positive integer in order for it to make any sense.

It is true that now if $user_id was set to 0 - which has no sensible meaning we will now run the db query and create a WP_User for 0 which we wouldn't have done before.

I will add the second check in to remove this possibility

#2 @westi
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [12391]) Restore the check for trueness on $user_id so we don't run the queries or create the objects. Fixes #11419 props Denis-de-Bernardy.

Note: See TracTickets for help on using tickets.