From: al at forest dot akadem dot ru Operating system: Windows 2000 PHP version: 4.3.4 PHP Bug Type: InterBase related Bug description: Extension shouldn't check whether a parameter should be NULL
Description: ------------ Having Windows 2000 SP4, PHP 4.3.4, php_interbase latest checked from CVS (Revision 1.91.2.26). Firebird SS 1.0.3 Having a table in db (dialect 3): CREATE TABLE T_TEST ( F1 TIMESTAMP NOT NULL, F2 INTEGER ); and a trigger associated with it: CREATE TRIGGER T_TEST_BI0 FOR T_TEST ACTIVE BEFORE INSERT POSITION 0 AS begin if (new.f1 IS null) then new.f1 = current_timestamp; end This mean that no record will be inserted with F1 set to NULL. Having code reproduced below I get a message: Warning: ibase_query(): Parameter 90206904 must have a value in c:\g2\htdocs\ibase_not_null.php on line 7 The problem seems to lie around lines 1199-1202 in interbase.c Reproduce code: --------------- <?php $G2db = ibase_connect( '/path/to/db', 'user', 'passw', 'WIN1251', 0, 3, 'role'); $G2tr = ibase_trans(IBASE_NOWAIT, $G2db); $qry = ibase_query($G2tr, 'insert into t_test (f1, f2) values (?, ?)', NULL, '33'); ibase_commit($G2tr); ibase_close($G2db); ?> Expected result: ---------------- PHP shouldn't complain at all. -- Edit bug report at http://bugs.php.net/?id=26777&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26777&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26777&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26777&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26777&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26777&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=26777&r=needscript Try newer version: http://bugs.php.net/fix.php?id=26777&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26777&r=support Expected behavior: http://bugs.php.net/fix.php?id=26777&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26777&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26777&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26777&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26777&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26777&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26777&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26777&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26777&r=float