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

Bug #12907 get() gives warning on empty path
Submitted: 2008-01-14 22:28 UTC
From: samwilson Assigned: denny
Status: Closed Package: Text_PathNavigator (version 0.1.0dev1)
PHP Version: 5.2.3 OS: Linux
Roadmaps: (Not assigned)    

 [2008-01-14 22:28 UTC] samwilson (Sam Wilson)
Description: ------------ If a Text_PathNavigator object is created with an empty (or '/') path, get(0) throws a warning. Test script: --------------- <?php require_once 'Text/PathNavigator.php'; // When $_SERVER['REQUEST_URI'] is '/' only. $pathNav = new Text_PathNavigator($_SERVER['REQUEST_URI']); $first = $pathNav->get(0); ?> Actual result: -------------- Warning: array_slice() [function.array-slice]: The first argument should be an array in /home/user/pear/php/Text/PathNavigator.php on line 179


 [2008-05-05 12:36 UTC] doconnor (Daniel O'Connor)
I've nudged the package author about getting their code into CVS or similar, so we can patch this easily.
 [2008-05-10 03:46 UTC] samwilson (Sam Wilson)
I fixed this bug by changing line 99 from ? false to ? array() . Thanks for helping get this fixed.
 [2009-09-28 20:35 UTC] denny (Denny Shimkoski)
-Status: Verified +Status: Closed -Assigned To: +Assigned To: denny
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at