php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71280 ibase_blob_add() expects parameter 2 to be resorce
Submitted: 2016-01-05 08:57 UTC Modified: 2016-01-20 17:06 UTC
From: ira dot tonert at e-vendo dot de Assigned:
Status: Closed Package: InterBase related
PHP Version: 7.0.1 OS: Windows
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ira dot tonert at e-vendo dot de
New email:
PHP Version: OS:

 

 [2016-01-05 08:57 UTC] 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.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-01-05 15:03 UTC] 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 15:03 UTC] laruence@php.net
-Status: Open +Status: Closed
 [2016-01-20 17:06 UTC] ira dot tonert at e-vendo dot de
In which new php version it will be fixed? In version 7.0.2 it is not okay yet.
 [2016-07-20 11:34 UTC] davey@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)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC