xref: /PHP-7.4/ext/oci8/tests/lob_033.phpt (revision 26dfce7f)
1--TEST--
2various oci_lob_write() error messages
3--SKIPIF--
4<?php
5$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
6require(__DIR__.'/skipif.inc');
7?>
8--FILE--
9<?php
10
11require __DIR__.'/connect.inc';
12require __DIR__.'/create_table.inc';
13
14$ora_sql = "INSERT INTO
15                       ".$schema.$table_name." (id, blob)
16                      VALUES (2, empty_blob())
17                      RETURNING
18                               blob
19                      INTO :v_blob ";
20
21$statement = oci_parse($c,$ora_sql);
22$blob = oci_new_descriptor($c,OCI_D_LOB);
23
24$blob->save("");
25
26oci_bind_by_name($statement,":v_blob", $blob,-1,OCI_B_BLOB);
27oci_execute($statement, OCI_DEFAULT);
28
29var_dump($blob->save(""));
30var_dump($blob->save("data", 100));
31
32require __DIR__.'/drop_table.inc';
33
34echo "Done\n";
35
36?>
37--EXPECTF--
38Warning: OCI-Lob::save(): OCI_INVALID_HANDLE in %s on line %d
39bool(true)
40bool(true)
41Done
42