Fixed to prevent a crash when accessing the base page of a project with no /.

When accessing the base page of a project without a trailing slash, the regex to get the project in the
request object was not matching, resulting in a missing project in the request object.
dev
Loic d'Anterroches 2009-02-17 09:37:05 +01:00
parent d1b139bb30
commit 64dc8ec3b8
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ class IDF_Middleware
function process_request(&$request)
{
$match = array();
if (preg_match('#^/(?:api/p|p)/([\-\w]+)/#', $request->query, $match)) {
if (preg_match('#^/(?:api/p|p)/([\-\w]+)/?#', $request->query, $match)) {
try {
$request->project = IDF_Project::getOr404($match[1]);
} catch (Pluf_HTTP_Error404 $e) {