|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62300 Wrong NULL checks
Submitted: 2012-06-12 13:00 UTC Modified: 2017-10-24 06:45 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: qiyuhua at 126 dot com Assigned:
Status: Open Package: InterBase related
PHP Version: 5.4.3 OS: ubuntu 10.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
39 - 37 = ?
Subscribe to this entry?

 [2012-06-12 13:00 UTC] qiyuhua at 126 dot com
As described in, 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
< 				continue;
> 				//continue;

Test script:
The two simple test scripts can be available at
1)create a table like "createtable.php";
2)insert a NULL value like "huahua.php"

then, some errors will occur.


patch-for-wrong-null (last revision 2012-06-16 03:08 UTC by qiyuhua at 126 dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-12 23:23 UTC]
Please, send a unified diff next time. Thanks.
 [2012-06-16 03:13 UTC] qiyuhua at 126 dot com
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.
 [2014-04-08 11:50 UTC]
-Assigned To: +Assigned To: mariuz
 [2017-10-24 06:45 UTC]
-Status: Assigned +Status: Open -Assigned To: mariuz +Assigned To:
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Aug 22 13:01:27 2019 UTC