ID:               32717
 User updated by:  volf44 at yandex dot ru
 Reported By:      volf44 at yandex dot ru
 Status:           Open
 Bug Type:         Filesystem function related
 Operating System: Linux, Windows 2k
-PHP Version:      4.3.10, .11
+PHP Version:      4.3.11
 New Comment:

-


Previous Comments:
------------------------------------------------------------------------

[2005-04-18 12:58:04] volf44 at yandex dot ru

Oops, sorry. It seems I horried up to say "bogus".
Bug still exists in 4.3.11.

------------------------------------------------------------------------

[2005-04-15 14:33:52] volf44 at yandex dot ru

Yes, bogus. In 4.3.11 function works as expected.

------------------------------------------------------------------------

[2005-04-15 14:01:05] [EMAIL PROTECTED]

Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.



------------------------------------------------------------------------

[2005-04-15 13:56:55] volf44 at yandex dot ru

Description:
------------
fgetcsv() incorrect handles single double quote
in first position of the last record field.

Reproduce code:
---------------
file test.csv:
one|record with bad double quote|"4
two|record with good "|4
[EOF]

$fd = fopen( 'test.csv', 'rb' );
while( $rec = fgetcsv( $fd, 20480, '|' )){
    var_dump( $rec );
}


Expected result:
----------------
array(3) {
  [0]=>
  string(3) "one"
  [1]=>
  string(28) "record with bad double quote"
  [2]=>
  string(1) ""4"
}
array(3) {
  [0]=>
  string(3) "two"
  [1]=>
  string(18) "record with good ""
  [2]=>
  string(1) "4"
}

Actual result:
--------------
array(4) {
  [0]=>
  string(3) "one"
  [1]=>
  string(28) "record with bad double quote"
  [2]=>
  string(24) "4
two|record with good "
  [3]=>
  string(1) "4"
}


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=32717&edit=1

Reply via email to