PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » File System » File_Find » Bug #5756

$fullpath is not changing the result

Details

Submitted2005-10-22 19:05 UTC
FromAK-Palme at AK-Palme dot de
StatusBogus
PackageFile_Find
PHP Version4.3.10
OSDebian
Roadmaps(Not assigned)

Comments

[2005-10-22 19:05 UTC] AK-Palme at AK-Palme dot de

Description:
------------
Is does not matter, if $fullpath is set to true or false. In both possibilities the full path is returned

Test script:
---------------
<pre>
<?php
require_once('File/Find.php');
$FileFind = new File_Find();
print_r($FileFind->search('*.*', 'Modules/', 'shell', false));
print_r($FileFind->search('*.*', 'Modules/', 'shell', true));
?>
</pre>

Expected result:
----------------
Array
(
[0] => möter.tar
[1] => spacken.tar
[2] => mellingburger schleuse.tar
)
Array
(
[0] => Modules/möter.tar
[1] => Modules/spacken.tar
[2] => Modules/mellingburger schleuse.tar
)

Actual result:
--------------
Array
(
[0] => Modules/möter.tar
[1] => Modules/spacken.tar
[2] => Modules/mellingburger schleuse.tar
)
Array
(
[0] => Modules/möter.tar
[1] => Modules/spacken.tar
[2] => Modules/mellingburger schleuse.tar
)

[2006-02-02 12:19 UTC] tuupola at php dot net

Thank you for taking the time to write to us, but this is not
a bug.

http://pear.php.net/manual/en/package.filesystem.file-find.search.php

$fullpath - whether the string should be matched against the full path or only against the filename

Meaning the parameter is not about return values but matching.