ashrafmhd09 / php-csv-parser

Automatically exported from code.google.com/p/php-csv-parser
0 stars 0 forks source link

Patch does not work: tempnam returns NULL #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. install lib : SVN: $Id: DataSource.php 767 2009-02-23 14:17:07Z ktlacaelel $
2. run
3. error

What is the expected output? What do you see instead?

WARNING in
/Users/marcofrank/workspace_pdt2/weblibs_3rd/php5/File_CSV_DataSource-0.2.6/File
_CSV_DataSource-0.2.6/DataSource.php
2158
fgetcsv() expects parameter 1 to be resource, boolean given

WARNING in
/Users/marcofrank/workspace_pdt2/weblibs_3rd/php5/File_CSV_DataSource-0.2.6/File
_CSV_DataSource-0.2.6/DataSource.php
2169
fclose(): supplied argument is not a valid stream resource

WARNING in
/Users/marcofrank/workspace_pdt2/weblibs_3rd/php5/File_CSV_DataSource-0.2.6/File
_CSV_DataSource-0.2.6/DataSource.php
2340
unlink() [function.unlink]: No such file or directory

What version of the product are you using? On what operating system?

php newest

Please provide any additional information below.

the problem lies here:

$t_fname                = tempnam(md5(''), __CLASS__ . '_');
(row 2311 : DataSource.php)

$t_fname  returns NULL.

if I switch off the patch, all works fine:

$res = fopen($this->_filename, 'r');
#     $res = $this->_patch();

Original issue reported on code.google.com by omoo.med...@googlemail.com on 4 Mar 2009 at 9:40

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks, am just compiling 2.9 right now, and will give you feedback on this 
issue.
maybe a new bug in tempnam?
Anyhow I really want to get rid of "the patch"!
so I will run the code and get back to you.

Original comment by kazu....@gmail.com on 4 Mar 2009 at 5:18

GoogleCodeExporter commented 9 years ago
I have completly removed the patch and all tests pass, I think this should 
solve the
issue!

Original comment by kazu....@gmail.com on 9 Mar 2009 at 3:33