Issue Bug Closed

#56558IconUtility throws PHP-Warning if Spritemanager is not initialized

Caspar Stuebs 03/04/14, 23:07 updated 10/02/18, 12:03

Description

If the IconUtility function getSpriteIcon() is called without an initialized SpriteManager, the function generates an PHP Warning

Core: Error handler (FE): PHP Warning: in_array() expects parameter 2 to be array, null given in /[…]/typo3/sysext/backend/Classes/Utility/IconUtility.php line 601

This could occur e.g if parts of the backend are called via eId script.

Solution: Do a typecast.

Reviews 1