1--TEST-- 2Bug #46247 (ibase_set_event_handler() is allowing to pass callback without event) 3--SKIPIF-- 4<?php include("skipif.inc"); ?> 5--FILE-- 6<?php 7 8require("interbase.inc"); 9 10$db = ibase_connect($test_base); 11 12function test() { } 13 14ibase_set_event_handler(); 15 16ibase_set_event_handler('test', 1); 17ibase_set_event_handler($db, 'test', 1); 18ibase_set_event_handler(NULL, 'test', 1); 19 20 21ibase_set_event_handler('foo', 1); 22ibase_set_event_handler($db, 'foo', 1); 23ibase_set_event_handler(NULL, 'foo', 1); 24 25?> 26--EXPECTF-- 27 28Warning: Wrong parameter count for ibase_set_event_handler() in %s on line %d 29 30Warning: ibase_set_event_handler(): supplied argument is not a valid InterBase link resource in %s on line %d 31 32Warning: ibase_set_event_handler(): Callback argument foo is not a callable function in %s on line %d 33 34Warning: ibase_set_event_handler(): Callback argument foo is not a callable function in %s on line %d 35 36Warning: ibase_set_event_handler(): supplied argument is not a valid InterBase link resource in %s on line %d 37