Annotation of embedaddon/php/ext/interbase/tests/bug45373.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #45373 (php crash on query with errors in params)
3: --SKIPIF--
4: <?php include("skipif.inc"); ?>
5: --FILE--
6: <?php
7:
8: require("interbase.inc");
9:
10: $db = ibase_connect($test_base);
11:
12:
13: $sql = "select * from test1 where i = ? and c = ?";
14:
15: $q = ibase_prepare($db, $sql);
16: $r = ibase_execute($q, 1, 'test table not created with isql');
17: var_dump(ibase_fetch_assoc($r));
18: ibase_free_result($r);
19:
20: $r = ibase_execute($q, 1, 'test table not created with isql', 1);
21: var_dump(ibase_fetch_assoc($r));
22: ibase_free_result($r);
23:
24: $r = ibase_execute($q, 1);
25: var_dump(ibase_fetch_assoc($r));
26:
27: ?>
28: --EXPECTF--
29: array(2) {
30: ["I"]=>
31: int(1)
32: ["C"]=>
33: string(32) "test table not created with isql"
34: }
35:
36: Notice: ibase_execute(): Statement expects 2 arguments, 3 given in %s on line %d
37: array(2) {
38: ["I"]=>
39: int(1)
40: ["C"]=>
41: string(32) "test table not created with isql"
42: }
43:
44: Warning: ibase_execute(): Statement expects 2 arguments, 1 given in %s on line %d
45:
46: Warning: ibase_fetch_assoc() expects parameter 1 to be resource, boolean given in %s on line %d
47: NULL
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>