[wp-trac] [WordPress Trac] #50279: Issue in add_query_arg function. wp-includes/functions.php - line 1142
WordPress Trac
noreply at wordpress.org
Fri May 29 16:29:10 UTC 2020
#50279: Issue in add_query_arg function. wp-includes/functions.php - line 1142
-----------------------------+-----------------------------
Reporter: artprojectgroup | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 5.4.1
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
If you add a query array like this:
{{{#!php
<?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
<?php
$ret = preg_replace( '#=(&|$)#', '$1', $ret );
}}}
Gets "xxxxx==" and return "xxxxx=".
Please fix it.
Kind regards.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50279>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list