Bug #12907 [Ver->Csd]: get() gives warning on empty path

From: Date: Mon, 28 Sep 2009 15:35:05 +0000
Subject: Bug #12907 [Ver->Csd]: get() gives warning on empty path
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-1756@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=12907&edit=1 ID: 12907 Updated by: bytebrite@gmail.com Reported By: sam at co-operista dot com Summary: get() gives warning on empty path -Status: Verified +Status: Closed Type: Bug Package: Text_PathNavigator Operating System: Linux Package Version: 0.1.0dev1 PHP Version: 5.2.3 -Assigned To: +Assigned To: denny Roadmap Versions: New Comment: -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 http://pear.php.net/get/ Previous Comments: ------------------------------------------------------------------------ [2008-05-09 23:46:35] samwilson I fixed this bug by changing line 99 from ? false to ? array() . Thanks for helping get this fixed. ------------------------------------------------------------------------ [2008-05-05 08:36:27] doconnor I've nudged the package author about getting their code into CVS or similar, so we can patch this easily. ------------------------------------------------------------------------ [2008-01-14 17:28:21] samwilson 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 ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=12907&edit=1

« previous php.pear.bugs (#1756) next »