PHP  
 PHP_HEAD
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/oci8/tests/lob_026.phpt ('oci_lob_seek()/rewind()/append()')

Script

1: <?php
2:
3:
require __DIR__.'/connect.inc';
4: require 
__DIR__.'/create_table.inc';
5:
6:
$ora_sql "INSERT INTO
7:                        "
.$schema.$table_name." (blob)
8:                       VALUES (empty_blob())
9:                       RETURNING
10:                                blob
11:                       INTO :v_blob "
;
12:
13:
$statement oci_parse($c,$ora_sql);
14:
$blob oci_new_descriptor($c,OCI_D_LOB);
15:
oci_bind_by_name($statement,":v_blob"$blob,-1,OCI_B_BLOB);
16:
oci_execute($statementOCI_DEFAULT);
17:
18:
var_dump($blob);
19:
20:
var_dump(oci_lob_write($blob"test"));
21:
var_dump(oci_lob_rewind());
22:
var_dump(oci_lob_rewind($blob));
23:
var_dump(oci_lob_write($blob"str"));
24:
var_dump(oci_lob_seek(10OCI_SEEK_SET));
25:
var_dump(oci_lob_seek($blob10OCI_SEEK_SET));
26:
27:
oci_commit($c);
28:
29:
$select_sql "SELECT blob FROM ".$schema.$table_name." FOR UPDATE";
30:
$s oci_parse($c$select_sql);
31:
oci_execute($sOCI_DEFAULT);
32:
33:
var_dump($row oci_fetch_array($s));
34:
35:
var_dump(oci_lob_append());
36:
var_dump(oci_lob_append($blob));
37:
var_dump(oci_lob_append($row[0], $blob));
38:
var_dump(oci_lob_read(10000));
39:
var_dump(oci_lob_read($row[0], 10000));
40:
41:
oci_commit($c);
42:
43:
$select_sql "SELECT blob FROM ".$schema.$table_name." FOR UPDATE";
44:
$s oci_parse($c$select_sql);
45:
oci_execute($sOCI_DEFAULT);
46:
47:
$row oci_fetch_array($s);
48:
49:
var_dump(oci_lob_read($row[0], 10000));
50:
51: require 
__DIR__.'/drop_table.inc';
52:
53: echo 
"Done\n";
54:
55:
?>
56:

Expected

object(OCI-Lob)#%d (1) {
  ["descriptor"]=>
  resource(%d) of type (oci8 descriptor)
}
int(4)

Warning: oci_lob_rewind() expects exactly 1 parameter, 0 given in %s on line %d
NULL
bool(true)
int(3)

Warning: oci_lob_seek() expects parameter 1 to be OCI-Lob, int%sgiven in %s on line %d
NULL
bool(true)
array(2) {
  [0]=>
  object(OCI-Lob)#%d (1) {
    ["descriptor"]=>
    resource(%d) of type (oci8 descriptor)
  }
  ["BLOB"]=>
  object(OCI-Lob)#%d (1) {
    ["descriptor"]=>
    resource(%d) of type (oci8 descriptor)
  }
}

Warning: oci_lob_append() expects exactly 2 parameters, 0 given in %s on line %d
NULL

Warning: oci_lob_append() expects exactly 2 parameters, 1 given in %s on line %d
NULL
bool(true)

Warning: oci_lob_read() expects exactly 2 parameters, 1 given in %s on line %d
NULL
string(4) "strt"
string(8) "strtstrt"
Done

Output

object(OCI-Lob)#1 (1) {
  ["descriptor"]=>
  resource(11) of type (oci8 descriptor)
}
int(4)

Fatal error: Uncaught ArgumentCountError: oci_lob_rewind() expects exactly 1 parameter, 0 given in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_026.php:21
Stack trace:
#0 /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_026.php(21): oci_lob_rewind()
#1 {main}
  thrown in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_026.php on line 21

Diff

007+ Fatal error: Uncaught ArgumentCountError: oci_lob_rewind() expects exactly 1 parameter, 0 given in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_026.php:21
008+ Stack trace:
009+ #0 /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_026.php(21): oci_lob_rewind()
010+ #1 {main}
011+   thrown in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_026.php on line 21
007- Warning: oci_lob_rewind() expects exactly 1 parameter, 0 given in %s on line %d
008- NULL
009- bool(true)
010- int(3)
011- 
012- Warning: oci_lob_seek() expects parameter 1 to be OCI-Lob, int%sgiven in %s on line %d
013- NULL
014- bool(true)
015- array(2) {
016-   [0]=>
017-   object(OCI-Lob)#%d (1) {
018-     ["descriptor"]=>
019-     resource(%d) of type (oci8 descriptor)
020-   }
021-   ["BLOB"]=>
022-   object(OCI-Lob)#%d (1) {
023-     ["descriptor"]=>
024-     resource(%d) of type (oci8 descriptor)
025-   }
026- }
027- 
028- Warning: oci_lob_append() expects exactly 2 parameters, 0 given in %s on line %d
029- NULL
030- 
031- Warning: oci_lob_append() expects exactly 2 parameters, 1 given in %s on line %d
032- NULL
033- bool(true)
034- 
035- Warning: oci_lob_read() expects exactly 2 parameters, 1 given in %s on line %d
036- NULL
037- string(4) "strt"
038- string(8) "strtstrt"
039- Done

 

Generated at Mon, 06 May 2019 17:58:35 +0000 (944 days ago)

Copyright © 2005-2021 The PHP Group
All rights reserved.