ID: 34677 Updated by: [EMAIL PROTECTED] Reported By: ciprian at zuavra dot net -Status: Open +Status: Feedback -Bug Type: Reproducible crash +Bug Type: PostgreSQL related Operating System: Linux 2.6.12 PHP Version: 4.4.0 New Comment:
Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. Previous Comments: ------------------------------------------------------------------------ [2005-09-29 10:41:13] ciprian at zuavra dot net Description: ------------ Using pg_insert() with a data array that offers a long integer (1125522000) for a table field which was supposed to be of type 'date'. PHP crashes instantly. However, I cannot seem to reproduce this except in a rather complex closed source application. Reproduce code: --------------- $data = array( 'project_id'=>122, 'transaction_model_id' => 2, 'status' => 'FINAL', 'date_created' => 1125522000, //should be string in "date" format 'i18n_id' => 339451, 'unique_id' => 497263, ); $res = pg_insert(DB,'table_name',$data); echo 'it never gets here'; Expected result: ---------------- pg_insert() apparently doesn't produce any log message of any kind, ever. But I at least expected it to return false instead of crashing. It's worth noting that 5.0.5 doesn't have this problem. In 5.0.5, pg_insert() returns false and the error can be picked up by the rest of the code. However, 4.4.0 and 4.3.11 do have the problem. Actual result: -------------- Crash. I will try to provide a backtrace. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34677&edit=1