Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#42796 closed defect (bug) (fixed)

Fix @staticvar in the docblock of wp_rand()

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

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 8 years ago.
Created patch to fix @staticvar

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
8 years ago

  • Keywords needs-patch good-first-bug added
  • Milestone changed from Awaiting Review to 5.0

@chetan200891
8 years ago

Created patch to fix @staticvar

#2 @birgire
8 years ago

  • Keywords has-patch added; needs-patch removed

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

#3 @SergeyBiryukov
8 years ago

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

In 42377:

Docs: Correct @staticvar entry for wp_rand().

Props chetan200891, birgire.
Fixes #42796.

#4 @johnbillion
7 years ago

  • Milestone changed from 5.0 to 5.1
Note: See TracTickets for help on using tickets.