Annotation of embedaddon/php/ext/interbase/tests/bug45575.phpt, revision 1.1.1.1

1.1       misho       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: 
                      8: require("interbase.inc");
                      9: 
                     10: $db = ibase_connect($test_base);
                     11: 
                     12: function foobar($var) { var_dump($var); return true; }
                     13: 
                     14: ibase_set_event_handler($db, null, 'TEST1');
                     15: ibase_set_event_handler($db, 1, 'TEST1');
                     16: ibase_set_event_handler('foobar', 'TEST1');
                     17: 
                     18: ?>
                     19: --EXPECTF--
                     20: Warning: ibase_set_event_handler(): Callback argument  is not a callable function in %s on line %d
                     21: 
                     22: Warning: ibase_set_event_handler(): Callback argument 1 is not a callable function in %s on line %d

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>