URI.php error when passing parameter with : (colon) |
[eluser]Unknown[/eluser]
i got an error yesterday when passing parameter with : (colon) http://kimci.detanto.net/hrd/member/999:2 i need to pass that value because i will use one function to display several list, in this case 999 is the identity of the member, 2 is the option. in my case 1 is "experience", 2 is "job description", and so on, so i need to pass the ":" string.. while researching, i find that on URI.php, there is additional procedure on _fetch_uri_string that is Code: if ($uri = $this->_detect_uri()) Code: $uri = parse_url($uri, PHP_URL_PATH); Code: $uri = str_replace(":","~",$uri); At first, i create MY_URI because i don't want to change CI core, but it didn't work, because _detect_uri is a private function, so i have to change the CI core .. is there any other way to fix it?
[eluser]zivel[/eluser]
I have the same behavior. Is this a PHP Bug? Because after some investigation I found out: Code: WORKS: Code: DOES NOT WORK any idea? (here my testcode) Code: $url= array(
[eluser]InsiteFX[/eluser]
Try this. Code: $uri = parse_url($uri, urlencode(PHP_URL_PATH)); InsiteFX
[eluser]zivel[/eluser]
Thats It! Thank you InsiteFX! I changed now line 196 in /system/core/URI.php from Code: $uri =parse_url($uri, PHP_URL_PATH); Code: $uri = urldecode(parse_url(urlencode($uri), PHP_URL_PATH)); As a new member of this community, what should I do that this change is integrated into CodeIginter? Fill in a Bug report? Thank you - Renato |
Welcome Guest, Not a member yet? Register Sign In |