power-media / prado3

Automatically exported from code.google.com/p/prado3
Other
0 stars 0 forks source link

Can't get parameters when friendly url enabled with UrlFormat=Path #418

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Enable friendly-url
2. Create url pattern and set UrlFormat="Path"
3. Create page and try to echo $this->Request['myvar'];
4. try url like /yourpattern/myvar/OK (same as /yourpattern/?myvar=OK)

What is the expected output? 
Page loaded and see myvar -parameter value (OK) 

What do you see instead?
Error that myvar request parameter not found.

What version of the product are you using? On what operating system?
Prado 3.2.0
Max OS X 10.0.74

Possible fix:

File: framework/Web/TUrlMapping.php
Class: TUrlMappingPattern
Function: TUrlMappingPattern::getPatternMatches()
Line: 697

$matches2[$key]=($value=array_shift($params)) ? $value : '';
-->
$matches[$key]=($value=array_shift($params)) ? $value : '';

Original issue reported on code.google.com by sampsa.s...@inoob.com on 27 Jul 2012 at 3:03

GoogleCodeExporter commented 8 years ago
fixed in r3194, thank you

Original comment by ctrlal...@gmail.com on 28 Jul 2012 at 11:10