bug45575.phpt 604 B

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