mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Fixing default extension parsing behavior for Router::parseExtensions()
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4432 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
4c25103751
commit
ed2b697999
1 changed files with 4 additions and 4 deletions
|
@ -62,11 +62,11 @@ class Router extends Overloadable {
|
|||
*/
|
||||
var $__parseExtensions = false;
|
||||
/**
|
||||
* Array of valid extensions to parse from a url
|
||||
* List of valid extensions to parse from a URL. If null, any extension is allowed.
|
||||
*
|
||||
* @var boolean
|
||||
* @var array
|
||||
*/
|
||||
var $__validExtensions = array();
|
||||
var $__validExtensions = null;
|
||||
/**
|
||||
* 'Constant' regular expression definitions for named route elements
|
||||
*
|
||||
|
@ -261,7 +261,7 @@ class Router extends Overloadable {
|
|||
if ($_this->__parseExtensions) {
|
||||
if(preg_match('/\.[0-9a-zA-Z]*$/', $url, $match) == 1) {
|
||||
$match = substr($match[0], 1);
|
||||
if(is_null($_this->__validExtensions)) {
|
||||
if(empty($_this->__validExtensions)) {
|
||||
$url = substr($url, 0, strpos($url, '.' . $match));
|
||||
$ext = $match;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue