Ticket #194 (closed defect: worksforme)
PHP 5.3 class type hint must be null error with namespaces
| Reported by: | tom@… | Owned by: | moo |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.3.2 |
| Component: | cacher | Version: | |
| Keywords: | namespace type hint | Cc: | |
| Blocked By: | PHP Version: | 5.3-alpha2 | |
| Application: | Need User Feedback: | no | |
| Other Exts: | SAPI: | FastCGI | |
| Probability: | Always | Blocking: |
Description (last modified by moo) (diff)
Using xcache from svn trunk, once any class that uses class type hints in a method definition with null as the default value has been cached, php engine will throw a fatal error complaining that the default value is *not* null, if you "use" the same namespace as the one you are working in.
trivial example:
<?php namespace My::NS; use My::NS; class A { public function test(A $obj=null) { var_dump($obj); } }
actual result: "Fatal error: Default value for parameters with a class type hint can only be NULL in ..."
expected: no errors
Change History
Note: See
TracTickets for help on using
tickets.

