Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 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: 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.

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

Here is the linked source on Trac:

Change History (5)

#1 @audrasjb
3 years ago

Props @crstauf who raised this in DevHub user notes.

#2 @audrasjb
3 years ago

  • Description modified (diff)

#3 @coffee2code
3 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
3 years ago

  • Milestone set to

#5 @audrasjb
3 years ago

  • Keywords needs-patch removed

Thanks @coffee2code!

Note: See TracTickets for help on using tickets.