[TYPO3-dam-devel] RFC: #11623: Remove deprecated assignments by reference when using "new" statement

Dan Osipov dosipov at phillyburbs.com
Sun Aug 2 23:06:21 CEST 2009


+1 by reading.

Shouldn't these classes be instantiated with t3lib_div::makeInstance?

Dan Osipov
Calkins Media
http://danosipov.com/blog/

Andreas Wolf wrote:
> This is an SVN patch request.
> 
> Type: Code cleanup
> 
> Extension: dam, but all other might be affected, too
> 
> Bugtracker references: http://bugs.typo3.org/view.php?id=11623
> 
> Branches: dam_1-1 / trunk
> 
> Problem:
> 
> With PHP 5, using =& when assigning the return value of the new
> statement is deprecated - objects are always assigned by reference in
> PHP 5. As PHP 5.3 also introduced a new error level, E_DEPRECATED, error
> messages are thrown when using deprecated functions or statements.
> 
> To make matters worse, TYPO3 overrides the setting for error_reporting,
> so even if you configure your PHP 5.3 to not show these errors, they are
> still displayed within TYPO3.
> 
> 
> Solution:
> 
> The quick and easy solution is to replace all =& used with new by a
> simple =.
> 
> 
> Regards
> 
> Andreas
> 


More information about the TYPO3-team-dam mailing list