File CSV search


Search an entry into a CSV file should be easy with PEAR::File package. I've recently used the version 1.2.0 and found a problem.

Once a csv file was opened, it won't be well closed, so a new search failed, especially if entry is before the latest entry searched.


* My patch still run with files :

* i have added file stack pointers dump on the test script.
* a live demo is now online.

Bug 4295 opened and first proposal of patch was given

Patch to apply to File/CSV.php

Today (May, 6 2005) the PEAR CVS repository has this file CSV.php,v 1.20 2005/03/31 05:50:46 dufuz Exp

Have a look on method getPointer() on lines 128 to 155

Remove lines 130 to 135, 140 and 147 (like [3]) and all will run fine

Source Codes

Live demo