Commit: 365cf2be8f722f9935c5c80e34577d5aba8a1d86 Author: Anna Filina <[email protected]> Fri, 18 Dec 2020 11:20:45 -0500 Committer: Christoph M. Becker <[email protected]> Fri, 18 Dec 2020 23:47:36 +0100 Parents: c5530f2f50c9a81cc3c6caa04af5d3685c80766e Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=365cf2be8f722f9935c5c80e34577d5aba8a1d86 Log: Parse page id even when .php is missing Changed paths: M include/errors.inc Diff: diff --git a/include/errors.inc b/include/errors.inc index 4bd985566..d72963ae3 100644 --- a/include/errors.inc +++ b/include/errors.inc @@ -524,7 +524,7 @@ function get_legacy_manual_urls(string $uri): array $filename = $_SERVER["DOCUMENT_ROOT"] . "/manual/legacyurls.json"; $pages_ids = json_decode(file_get_contents($filename), true); $page_id = preg_replace_callback('/^manual\/.*\/(.*?)(\.php)?$/', function (array $matches): string { - if (count($matches) !== 3) { + if (count($matches) < 2) { return ''; } return $matches[1] ; -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
