Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#52947 closed defect (bug) (reported-upstream)

Docs: json_decode PHP function is inadvertently pulled up in DevHub documentation

Reported by: audrasjb's profile audrasjb Owned by:
Milestone: WordPress.org Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: docs Cc:

Description (last modified by audrasjb)

I don't know exactly why, but it seems like the json_decode native PHP function is inadvertently pulled up in DevHub Documentation.

https://developer.wordpress.org/reference/functions/json_decode/

Interestingly, the related source code seems to be the hash_equals function.

Here is the linked source on Trac: https://core.trac.wordpress.org/browser/tags/5.7/src/wp-includes/compat.php#L304

Change History (5)

#1 @audrasjb
4 years ago

Props @crstauf who raised this in DevHub user notes.

#2 @audrasjb
4 years ago

  • Description modified (diff)

#3 @coffee2code
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

Core included a polyfill for json_decode() (and a few other functions) until [46208]. See #47699 for the ticket related to its removal.

The PHPDOC parser plugin used by DevHub does not currently handle the complete removal of a function from the source being parsed, so such functions (as the one referenced here) get orphaned.

I've removed the following polyfills that had been removed in [46208]:

  • json_encode()
  • json_decode()
  • _json_decode_object_helper()
  • json_last_error_msg()

Closing as reported-upstream since this is really a problem for meta.trac (though I've taken care of it here).

#4 @SergeyBiryukov
4 years ago

  • Milestone set to WordPress.org

#5 @audrasjb
4 years ago

  • Keywords needs-patch removed

Thanks @coffee2code!

Note: See TracTickets for help on using tickets.