Opened 5 years ago
Last modified 4 years ago
#50279 new defect (bug)
add_query_arg() removes equal sign from assigned value
Reported by: | artprojectgroup | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.4.1 |
Component: | General | Keywords: | needs-patch |
Focuses: | Cc: |
Description
If you add a query array like this:
<?php $data =[ 'api_id' => 'xxxxx==', 'to' => 123456, 'text' => "Prueba", ]; $url = add_query_arg( $data , 'https://xxx.com' );
The $url you get is this: https://xxx.com?api_id=xxxxx=&to=123456&text=Prueba
The line 1142:
<?php $ret = preg_replace( '#=(&|$)#', '$1', $ret );
Gets "xxxxx==" and return "xxxxx=".
Please fix it.
Kind regards.
Change History (1)
Note: See
TracTickets for help on using
tickets.
The example URL keeps the API ID value intact without the
preg_replace
, but I don't know what might break (for others) without it.For history, that line was added in [5999] on ticket #4878.