Opened 16 months ago
Closed 16 months ago
#63497 closed defect (bug) (fixed)
Docs: Fix parameter order mismatch in wp_cache_cas_by_key()
| Reported by: | truptikanzariya | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.9 |
| Component: | Build/Test Tools | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | docs |
Description (last modified by )
There is a parameter order mismatch in the PHPDoc block for the wp_cache_cas_by_key() function.
Affected File : /tests/phpunit/includes/object-cache.php
Issue
The function signature is: function wp_cache_cas_by_key( $cas_token, $server_key, $key, $value, $group = '', $expiration = 0 )
But the PHPDoc states:
* @param string $server_key The key identifying the server to store the value on. * @param float $cas_token Unique value associated with the existing item. Generated by memcached.
Proposed Fix:
The PHPDoc should be updated to:
* @param float $cas_token Unique value associated with the existing item. Generated by memcached. * @param string $server_key The key identifying the server to store the value on.
Thank you...
Attachments (3)
Change History (7)
#1
@
16 months ago
- Component Cache API → Build/Test Tools
- Keywords commit added
- Milestone Awaiting Review → 6.9
#2
@
16 months ago
- Description modified (diff)
- Focuses docs added
- Keywords changes-requested added; commit removed
The casByKey() function also reverses $server_key and $cas_token, on lines 1241 to 1242 of the same file.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi there!
Nice catch!