Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#42796 closed defect (bug) (fixed)

Fix @staticvar in the docblock of wp_rand()

Reported by: birgire Owned by: SergeyBiryukov
Priority: normal Milestone: 5.1
Component: General Version: 4.4
Severity: normal Keywords: good-first-bug has-patch
Cc: Focuses: docs

Description

The inline documentation for the wp_rand() has

* @staticvar bool $external_rand_source_available

but there's no such static variable in use. The changeset is [34981].

So it looks like a typo and should be:

* @staticvar bool $use_random_int_functionality

Good-first-bug?

Reference:

https://core.trac.wordpress.org/browser/tags/4.9.1/src/wp-includes/pluggable.php#L2315

Attachments (1)

42796.diff (502 bytes ) - added by chetan200891 9 years ago.
Created patch to fix @staticvar

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
9 years ago

  • Keywords needs-patch good-first-bug added
  • Milestone Awaiting Review5.0

@chetan200891
9 years ago

Created patch to fix @staticvar

#2 @birgire
9 years ago

  • Keywords has-patch added; needs-patch removed

@chetan200891 thanks for the patch, it looks good to me

#3 @SergeyBiryukov
9 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status newclosed

In 42377:

Docs: Correct @staticvar entry for wp_rand().

Props chetan200891, birgire.
Fixes #42796.

#4 @johnbillion
8 years ago

  • Milestone 5.05.1
Note: See TracTickets for help on using tickets.