keboola / php-csv

CSV reader/writer
MIT License
135 stars 35 forks source link

suppressed fopen warning #9

Closed mike182uk closed 11 years ago

mike182uk commented 11 years ago

When trying to write to a file that does not exist i.e test/test.csv fopen outputs the warning:

PHP Warning:  fopen(test/test.csv): failed to open stream: No such file or directory in...

This is correct, but with you throwing an exception immediately after the fopen (if there is no file pointer) then i think it is safe to suppress this error (as you are handling it with the exception anyway).