note 80379 added to language.functions
| From: | Stefan at osu1 dot php dot net | Date: | Sun, 13 Jan 2008 02:54:23 +0000 |
| Subject: | note 80379 added to language.functions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-135061@lists.php.net to get a copy of this message | ||
Suppose we have a method
function appendChildNode( AST $aNewChild ) {
....
}
which is defined inside of the class AST.
If I pass a null value, I get this error 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
<<<
Can't we pass null for a class-typed argument?
----
Server IP: 212.124.37.9
Probable Submitter: 77.186.136.74
----
Manual Page -- http://www.php.net/manual/en/language.functions.php
Edit -- https://master.php.net/note/edit/80379
Del: integrated -- https://master.php.net/note/delete/80379/integrated
Del: useless -- https://master.php.net/note/delete/80379/useless
Del: bad code -- https://master.php.net/note/delete/80379/bad+code
Del: spam -- https://master.php.net/note/delete/80379/spam
Del: non-english -- https://master.php.net/note/delete/80379/non-english
Del: in docs -- https://master.php.net/note/delete/80379/in+docs
Del: other reasons-- https://master.php.net/note/delete/80379
Reject -- https://master.php.net/note/reject/80379
Search -- https://master.php.net/manage/user-notes.php