|  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: 2021-03-31 11:36 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: Suspended Package: InterBase related
PHP Version: 5.4.3 OS: ubuntu 10.04
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [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:
 [2021-03-31 11:36 UTC]
-Status: Open +Status: Suspended
 [2021-03-31 11:36 UTC]
The interbase extension is moved to PECL[1] as of PHP 7.4.0, and
is looking for a new maintainer.  Until a new maintainer is found,
I suspend this ticket.

Consider to use the bundled PDO_Firebird extension, or the
php-firebird package[2] instead.

[1] <>
[2] <>
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed May 25 01:05:44 2022 UTC