#27130 closed defect (bug) (fixed)
Credentials parameter default in wp_signon() should be an array
| Reported by: | tivnet | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.9 |
| Component: | Users | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
* @param array $credentials Optional. User info in order to sign on.
* @param bool $secure_cookie Optional. Whether to use secure cookie.
* @return object Either WP_Error on failure, or WP_User on success.
*/
function wp_signon( $credentials = '', $secure_cookie = '' ) {
@return WP_User|WP_Error Either WP_Error on failure, or WP_User on success.
$credentials = '', $secure_cookie = ''probably wrong default values. Or wrong@param
Attachments (1)
Change History (10)
#4
in reply to: ↑ 3
@
13 years ago
Replying to DrewAPicture:
@tivnet: Care to make a patch? :)
I usually do. In this case, there were unclear moments (see Sergey's comments)
If what Sergey wrote is final - I'll make a patch...
...or you can just fix that :-), and I'll lose the "props" this time :-)))
#5
@
13 years ago
- Keywords has-patch added; needs-patch removed
Ticket #26148 has patch this addresses this issue.
Version 0, edited 13 years ago by
(next)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Seems like the default value of
$credentialsshould be an array.We use strict comparison for
$secure_cookiethough:https://core.trac.wordpress.org/browser/tags/3.8.1/src/wp-includes/user.php#L43
Could probably use
nullinstead, but need to be careful with backwards compatibility, so I guess it's safer to keep it a string. The@paramdescription is correct, it's treated as a boolean value.