Bug #71280 [NEW]: ibase_blob_add() expects parameter 2 to be resorce
| From: | ira dot tonert at e-vendo dot de | Date: | Tue, 05 Jan 2016 08:57:04 +0000 |
| Subject: | Bug #71280 [NEW]: ibase_blob_add() expects parameter 2 to be resorce | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-198421@lists.php.net to get a copy of this message | ||
From: ira dot tonert at e-vendo dot de
Operating system: Windows
PHP version: 7.0.1
Package: InterBase related
Bug Type: Bug
Bug description:ibase_blob_add() expects parameter 2 to be resorce
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 bug report at https://bugs.php.net/bug.php?id=71280&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71280&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71280&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71280&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71280&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71280&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71280&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71280&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71280&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71280&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71280&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71280&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71280&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71280&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71280&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71280&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71280&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71280&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71280&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71280&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71280&r=mysqlcfg