xref: /PHP-5.6/ext/interbase/tests/bug45575.phpt (revision e8f25c5b)
1--TEST--
2Bug #45575 (Segfault with invalid non-string as event handler callback)
3--SKIPIF--
4<?php include("skipif.inc"); ?>
5--FILE--
6<?php
7
8require("interbase.inc");
9
10$db = ibase_connect($test_base);
11
12function foobar($var) { var_dump($var); return true; }
13
14ibase_set_event_handler($db, null, 'TEST1');
15ibase_set_event_handler($db, 1, 'TEST1');
16ibase_set_event_handler('foobar', 'TEST1');
17
18?>
19--EXPECTF--
20Warning: ibase_set_event_handler(): Callback argument  is not a callable function in %s on line %d
21
22Warning: ibase_set_event_handler(): Callback argument 1 is not a callable function in %s on line %d
23