php: Fix char* typecheck typemap to accept Null

The corresponding in typemap already does.

Fixes #1655, reported by CJSlominski.
This commit is contained in:
Olly Betts 2021-03-18 10:53:58 +13:00 committed by Olly Betts
commit b7dedecfdd
4 changed files with 25 additions and 1 deletions

View file

@ -0,0 +1,14 @@
<?php
require "tests.php";
require "overload_polymorphic.php";
$t = new Derived();
check::equal(overload_polymorphic::test($t), 0, "test(Derived)");
check::equal(overload_polymorphic::test(1), 1, "test(1)");
check::equal(overload_polymorphic::test2($t), 1, "test2(Derived)");
check::equal(overload_polymorphic::test3($t, null, $t), 1, "test3(Derived, null, Derived)");
check::done();
?>