mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Replace eval usage in request processing with new WP_MatchesMapRegex() class usage. See #9602 props hakre.
git-svn-id: https://develop.svn.wordpress.org/trunk@11853 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -299,7 +299,7 @@ function url_to_postid($url) {
|
||||
$query = preg_replace("!^.+\?!", '', $query);
|
||||
|
||||
// Substitute the substring matches into the query.
|
||||
eval("\$query = \"" . addslashes($query) . "\";");
|
||||
$query = addslashes(WP_MatchesMapRegex::apply($query, $matches));
|
||||
// Filter out non-public query vars
|
||||
global $wp;
|
||||
parse_str($query, $query_vars);
|
||||
|
||||
Reference in New Issue
Block a user