ID: 37589 User updated by: coffy at bluecups dot net Reported By: coffy at bluecups dot net Status: Closed Bug Type: dBase related Operating System: Linux PHP Version: 5.1.4 New Comment:
there is similar bug that i found, you can't also hide (with @) error "open: No such file or directory", if the file you are trying to open with dbase_open() doesn't exist; Previous Comments: ------------------------------------------------------------------------ [2006-05-25 11:48:17] [EMAIL PROTECTED] I removed the "unable to get headers" error message, but the PHP Warning must be there, as you should be able to know the reason why dbase_open() returns FALSE. ------------------------------------------------------------------------ [2006-05-25 10:52:13] coffy at bluecups dot net Description: ------------ When you try to open(mode 0) not correct dbase file using dbase_open it should return just FALSE according to http://www.php.net/manual/en/function.dbase-open.php, instead it prints "unable to get header" and "Warning: dbase_open(): unable to open database". Reproduce code: --------------- code 1 <?php $db = dbase_open("ERR.DBF", 0); dbase_close($db); ?> code 2 <?php $db = @dbase_open("ERR.DBF", 0); @dbase_close($db); ?> Expected result: ---------------- No warning or "unable to get header", it should just return false (according to currenct documentation). Even if the warning is right behavior(and it's just missing from documentation), it still should be possible to hide "unable to get header" using @. Actual result: -------------- Fill "ERR.DBF" with anything else than correct dbase info and you get the "unable to get header" and "Warning ..." (code 1). Also it's not possible to hide "unable to get header" message, code 2 is using @-s and it still prints "unable to get header", when you dont use correct dbf file. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37589&edit=1