[TYPO3-core] RFC #11154: calls to deprecated function makeInstanceClassName in core

Dmitry Dulepov dmitry.dulepov at gmail.com
Wed May 20 15:08:19 CEST 2009


Hi!

Franz Koch wrote:
> ups, sorry - I got deviated and then forgot to add the patch. Here it is.

The following does not make sense:

=============
-			$cls=t3lib_div::makeInstanceClassName('t3lib_htmlmail');
 				// Avoid autoloading of t3lib_htmlmail, since it's only a strategy check here:
-			if (class_exists($cls, false))	{	// If htmlmail lib is included, then generate a nice HTML-email
+			if (class_exists('t3lib_htmlmail', false))	{	// If htmlmail lib is included, then generate a nice HTML-email
=============

In my opinion, there is no need for this check when we have autoloading. This check was necessary before because this file did not want to include the t3lib_htmlmail class manually. Now the class will never exist because all require_once will be gone and the last parameter to class_exists is false. Therefore the condition is always false and it does not maker any sense. Just instantiate and use t3lib_htmlmail :)

-- 
Dmitry Dulepov
In the TYPO3 blog: http://dmitry-dulepov.com/article/slides-from-my-talks-at-t3dd09.html
LinkedIn: http://www.linkedin.com/in/dmitrydulepov
Twitter: http://twitter.com/dmitryd
Skype: liels_bugs


More information about the TYPO3-team-core mailing list