Skip to content

Commit aba8fa1

Browse files
author
Tom Clarke
committed
Moving from Slim to Silex
1 parent 6f0588a commit aba8fa1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

web/index.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@
4545
die();
4646
}
4747
$app['images']->serve($width, $height, '', $request);
48-
});
48+
})
49+
->assert('width', '\d+');
50+
->assert('height', '\d+');
4951

5052
$app->get('/{width}', function($width) use($app) {
5153
$app->redirect("/$width/$width", 303);
@@ -59,8 +61,8 @@
5961
}
6062
$app['images']->serve($width, $height, $person, $request);
6163
})
62-
->assert('width', '[\d]*')
63-
->assert('height', '[\d]*');
64+
->assert('width', '\d+')
65+
->assert('height', '\d+');
6466

6567
// Attribution
6668
$app->get('/attribution', function() use($app) {

0 commit comments

Comments
 (0)