Edit report at https://bugs.php.net/bug.php?id=62300&edit=1
ID: 62300 User updated by: qiyuhua at 126 dot com Reported by: qiyuhua at 126 dot com Summary: Wrong NULL checks Status: Open Type: Bug Package: InterBase related Operating System: ubuntu 10.04 PHP Version: 5.4.3 Block user comment: N Private report: N New Comment: I have updated the patch file. Test to reproduce the bug : 1.Create a table with not null field 2.Add trigger filling this field before insert 3.Try from PHP insert null value in the way of "ibase_query($dbh, "insert into hua values (3,?)",null)", which is the key for the reproduction. And if we insert null value in the way of "ibase_query($dbh, "insert into hua values (3,null)")", there is no error. Previous Comments: ------------------------------------------------------------------------ [2012-06-12 23:23:26] fel...@php.net Please, send a unified diff next time. Thanks. ------------------------------------------------------------------------ [2012-06-12 13:00:42] qiyuhua at 126 dot com Description: ------------ As described in https://bugs.php.net/bug.php?id=54426, Wrong NULL checks was found. However, we find that the bug is not well repaired. And we can still reproduce the bug. Removing the "continue" statement in the block of Null check code in ibase_query.c should be make everything work well: Modified: php/php-src/trunk/ext/interbase/ibase_query.c =================================================================== 679c679 < continue; --- > //continue; =================================================================== Test script: --------------- The two simple test scripts can be available at https://sourceforge.net/projects/wautorepair/files/test%20cases/ 1)create a table like "createtable.php"; 2)insert a NULL value like "huahua.php" then, some errors will occur. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62300&edit=1