Bug #71280 [Opn->Csd]: ibase_blob_add() expects parameter 2 to be resorce

From: Date: Tue, 05 Jan 2016 15:03:11 +0000
Subject: Bug #71280 [Opn->Csd]: ibase_blob_add() expects parameter 2 to be resorce
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-198425@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71280&edit=1

 ID:                 71280
 Updated by:         laruence@php.net
 Reported by:        ira dot tonert at e-vendo dot de
 Summary:            ibase_blob_add() expects parameter 2 to be resorce
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            InterBase related
 Operating System:   Windows
 PHP Version:        7.0.1
 Block user comment: N
 Private report:     N

 New Comment:

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)


Previous Comments:
------------------------------------------------------------------------
[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)

« previous php.bugs (#198425) next »