Project

General

Profile

Actions

Bug #23439

closed

PHP Warning in t3lib_spritemanager

Added by Sven Juergens over 14 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2010-08-24
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

i try to add a own sprite css with

$icons = array(
'extensions-myextension-icon1',
'extensions-myextension-icon2'
);
t3lib_SpriteManager::addIconSprite(
$icons,
t3lib_extMgm::siteRelPath('myextension') . 'myextension_sprite.css'
);

(example from http://blog.tolleiv.de/2010/07/typo3-4-4-sprites-in-your-extension/)

then i got a php Warning
PHP Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /.../t3lib/class.t3lib_spritemanager.php line 211

array_merge try to merge $GLOBALS['TBE_STYLES']['spritemanager']['spriteIconsAvailable'] and $icons but $GLOBALS['TBE_STYLES']['spritemanager']['spriteIconsAvailable'] is no array

testet with current trunk 8664
(issue imported from #M15543)


Files

15543.diff (641 Bytes) 15543.diff Administrator Admin, 2010-08-24 09:40
15543-v2.diff (444 Bytes) 15543-v2.diff Administrator Admin, 2010-10-15 19:56
Actions #1

Updated by Steffen Ritter about 14 years ago

thanks for your bug report, we currently found this one ourselves...

we think we better initialize the array

Actions #2

Updated by Steffen Kamper about 14 years ago

committed to svn
4_4 rev 9077
trunk rev 9078

Actions #3

Updated by Ernesto Baschny about 14 years ago

Steffen, you haven't seen the -v2 patch? I would prefer that solution, as it doesn't make sense to cast an unitialized array to an (array).

Actions #4

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF