Bug #71280 [Csd]: ibase_blob_add() expects parameter 2 to be resorce
Edit report at https://bugs.php.net/bug.php?id=71280&edit=1
ID: 71280
User updated by: ira dot tonert at e-vendo dot de
Reported by: ira dot tonert at e-vendo dot de
Summary: ibase_blob_add() expects parameter 2 to be resorce
Status: Closed
Type: Bug
Package: InterBase related
Operating System: Windows
PHP Version: 7.0.1
Block user comment: N
Private report: N
New Comment:
In which new php version it will be fixed? In version 7.0.2 it is not okay yet.
Previous Comments:
------------------------------------------------------------------------
[2016-01-05 15:03:10] laruence@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=d4da32d3125f3a2220023bd123cfbabdc2939b71
Log: Fixed bug #71280 (ibase_blob_add() expects parameter 2 to be resorce)
------------------------------------------------------------------------
[2016-01-05 08:57:01] ira dot tonert at e-vendo dot de
Description:
------------
According to the documentation the function ibase_blob_add expects 2 parameters. The first parameter
is a resource (the blob handle), the second parameter is a string (the data to be added). But in
PHP7 I get a warning message: "ibase_blob_add() expects parameter 2 to be resource, string
given ...". The data will not be added to the blob, the function doesn't work.
I haven't found any information for a change in the function-call. So I think I can use the
function in the usual way. But it doesn't work.
The data content is smaller than 64K.
Test script:
---------------
$linkID = ibase_pconnect(.....);
if ($linkID) {
$transID = ibase_trans(IBASE_WRITE|IBASE_COMMITTED|IBASE_REC_VERSION|IBASE_WAIT, $linkID);
if ($transID) {
$blob_id = ibase_blob_create($transID);
if ($blob_id) {
$iadd = ibase_blob_add($blob_id, $text);
$blob_id_str = ibase_blob_close($blob_id);
if ($blob_id_str) {
$queryID = ibase_query($transID, 'update tablename set blobfieldname = ? where
...mywherecondition...', $blob_id_str);
}
ibase_commit($transID);
}
ibase_close($linkID);
}
Expected result:
----------------
I wish that the function ibase_blob_add again works.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71280&edit=1
Thread (3 messages)