|
Posted by Rik Wasmus on 01/13/08 03:00
On Sun, 13 Jan 2008 03:50:33 +0100, seaside <seaside.ki@mac.com> wrote:
> I have a method
>
>>>>
> function appendChildNode( AST $aNewChild ) {
> ...
> }
> <<<
>
> where AST is a class. If I pass null, PHP renders this message:
>
>>>>
> Catchable fatal error: Argument 1 passed to AST::appendChildNode()
> must be an instance of AST, null given, called in /Applications/MAMP/
> htdocs/compile/includes/CParser.inc.php(517) : eval()'d code on line 1=
> and defined in /Applications/MAMP/htdocs/compile/includes/AST.inc.php
> on line 43
> <<<
>
> Any ideas, why I can't pass a null value?
For some reason:
function appendChildNode( AST $aNewChild =3D NULL ) {
....
}
.... now it will work.
-- =
Rik Wasmus
Navigation:
[Reply to this message]
|