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_024.phpt ('oci_lob_load()')

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($blob->size());
21:
var_dump($blob->write(str_repeat("string."1000)));
22:
var_dump($blob->size());
23:
oci_commit($c);
24:
25:
$select_sql "SELECT blob FROM ".$schema.$table_name." FOR UPDATE";
26:
$s oci_parse($c$select_sql);
27:
oci_execute($sOCI_DEFAULT);
28:
29:
var_dump($row oci_fetch_array($s));
30:
31:
var_dump(strlen($row[0]->load()));
32:
var_dump(strlen(oci_lob_load($row[0])));
33:
var_dump(oci_lob_load());
34: unset(
$row[0]->descriptor);
35:
var_dump(oci_lob_load($row[0]));
36:
37: require 
__DIR__.'/drop_table.inc';
38:
39: echo 
"Done\n";
40:
41:
?>
42:

Expected

object(OCI-Lob)#%d (1) {
  ["descriptor"]=>
  resource(%d) of type (oci8 descriptor)
}
int(0)
int(7000)
int(7000)
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)
  }
}
int(7000)
int(7000)

Warning: oci_lob_load() expects exactly 1 parameter, 0 given in %s on line %d
NULL

Warning: oci_lob_load(): Unable to find descriptor property in %s on line %d
bool(false)
Done

Output

object(OCI-Lob)#1 (1) {
  ["descriptor"]=>
  resource(11) of type (oci8 descriptor)
}
int(0)
int(7000)
int(7000)
array(2) {
  [0]=>
  object(OCI-Lob)#2 (1) {
    ["descriptor"]=>
    resource(13) of type (oci8 descriptor)
  }
  ["BLOB"]=>
  object(OCI-Lob)#2 (1) {
    ["descriptor"]=>
    resource(13) of type (oci8 descriptor)
  }
}
int(7000)
int(7000)

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

Diff

023+ Fatal error: Uncaught ArgumentCountError: oci_lob_load() expects exactly 1 parameter, 0 given in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_024.php:33
024+ Stack trace:
025+ #0 /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_024.php(33): oci_lob_load()
026+ #1 {main}
027+   thrown in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_024.php on line 33
023- Warning: oci_lob_load() expects exactly 1 parameter, 0 given in %s on line %d
024- NULL
025- 
026- Warning: oci_lob_load(): Unable to find descriptor property in %s on line %d
027- bool(false)
028- Done

 

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

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