PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » File System » File » Bug #3355

buildPath generates Warnings (missing delimiter in preg_quote())

Details

Submitted2005-02-02 07:33 UTC
Fromcmoehrke at netviser dot de
Assignedmike
StatusClosed
PackageFile
PHP Version5.0.3
OSLinux
Roadmaps(Not assigned)

Comments

[2005-02-02 07:33 UTC] cmoehrke at netviser dot de

Description:
------------
Using buildPath() results in a number of warnings, because the delimiter of the PCRE is a / which clashes with the directory separator.

Reproduce code:
---------------
require_once('File/Util.php');
$parts=array('a','b','c');
echo File_Util::buildPath($parts);

Expected result:
----------------
a/b/c

Actual result:
--------------
Warning: preg_match() [function.preg-match]: Unknown modifier '+' in /usr/local/php/pear/File/Util.php on line 60

Warning: preg_match() [function.preg-match]: Unknown modifier '+' in /usr/local/php/pear/File/Util.php on line 60

Warning: preg_match() [function.preg-match]: Unknown modifier '+' in /usr/local/php/pear/File/Util.php on line 60
a/b/c