Opened 5 weeks ago
Closed 4 weeks ago
#8455 closed defect (bug) (fixed)
Rosetta: Fix incorrect property assignment in User Sync
| Reported by: | timse201 | Owned by: | timse201 |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Make (Get Involved) / P2 | Keywords: | has-patch |
| Cc: |
Description
In WordPressdotorg\Rosetta\User\Sync::__construct(), $data->roles_to_sync is mistakenly assigned to $this->destination_site instead of $this->roles_to_sync.
Because of this typo:
$this->destination_sitegets overwritten with the roles array when$data->roles_to_syncis passed.$this->roles_to_syncremains uninitialized from the input data.- The
setup()method may return early or methods expecting$this->destination_siteto be aWP_Siteinstance fail.
Proposed solution:
Assign $data->roles_to_sync to $this->roles_to_sync.
Change History (4)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I've submitted a pull request to fix this issue by assigning
$data->roles_to_syncto$this->roles_to_syncinWordPressdotorg\Rosetta\User\Sync::__construct().PR: https://github.com/WordPress/wordpress.org/pull/1037
The change is limited to correcting the property assignment.