[TYPO3-core] RFC #10454: t3lib_div::makeInstanceClassName() allows to bypass checks for t3lib_Singleton
Ingo Renner
ingo at typo3.org
Tue Feb 17 23:11:54 CET 2009
Jeff Segars wrote:
Hi Jeff,
> Here's my +1 on reading and testing, with one item that may be open to
> some discussion.
>
> The call to newInstanceArgs() throws a fatal error if a developer passes
> arguments to a class without a constructor. On the one hand, this the
> developer's fault but at the the same time "new myclass(arg1, arg2)"
> doesn't throw a fatal error when there's no constructor.
hmm, not sure what to do about that one... any ideas welcome.
>
>> Fatal error: Uncaught exception 'ReflectionException' with message
>> 'Class language does not have a constructor, so you cannot pass any
>> constructor arguments'
well to me this particular exception is pretty clear: language actually
doesn't have a constructor - at least not an explicit one...
If the message solely resulted from that, than I think it's ok. Could
you test it with a different class again, a class that has a
constructor, but doesn't expect arguments...
all the best and thanks for the review
Ingo
--
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2
More information about the TYPO3-team-core
mailing list