Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.5.1

Bug #2989 Wrong parsing of arrays in QUERY_STRING
Submitted: 2004-12-19 14:46 UTC
From: support at infinity dot com dot ua Assigned: quipo
Status: Bogus Package: Pager
PHP Version: 5.0.2 OS: Windows XP SP2
Roadmaps: (Not assigned)    
Subscription  


 [2004-12-19 14:46 UTC] support at infinity dot com dot ua
Description: ------------ If QUERY_STRING contains arrays, they are being overencoded. This can be fixed by adding $name = rawurldecode($name); after line 637 (//check for arrays in parameters: site.php?foo[]=1&foo[]=2&foo[]=3) in Common.php. Reproduce code: --------------- <html> <head> <title>PEAR::Pager bug demonstration</title> </head> <body> <?php if (empty($_GET)) { ?> <form method="get"> <input type="text" name="foo[bar]" value="test" /> <input type="submit" /> </form> <?php } else { require_once 'Pager/Pager.php'; //create dummy array of data $myData = array(); for ($i=0; $i < 200; $i++) { $myData[] = $i; } $params = array( 'itemData' => $myData, ); $pager = & Pager::factory($params); $page_data = $pager->getPageData(); $links = $pager->getLinks(); echo 'Try to browse the pages and watch the QUERY_STRING messes up.<br/ >'; echo $links['all']; echo '<pre>'; var_dump($_GET); echo '</pre>'; } ?> </body> </html>

Comments

 [2004-12-19 15:50 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!