From ed2b6979996913cba68ca4b795abbfec752d2f66 Mon Sep 17 00:00:00 2001 From: nate Date: Sat, 3 Feb 2007 23:10:03 +0000 Subject: [PATCH] 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 --- cake/libs/router.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cake/libs/router.php b/cake/libs/router.php index 6c979c5ec..1558c8cd9 100644 --- a/cake/libs/router.php +++ b/cake/libs/router.php @@ -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 {