Hallo,
Ich habe ein Problem mit FileAsset:
Dieser Code funktioniert:
PHP-Code:
$asset = new \Assetic\Asset\FileAsset(TL_ROOT . '/assets/style1.css');
$GLOBALS['TL_CSS'][] = $asset;
Mit diesem bekomme ich eine Fehlermeldung:
PHP-Code:
$asset = new \Assetic\Asset\FileAsset(TL_ROOT . '/assets/style1.css');
$GLOBALS['TL_CSS'][] = $asset;
$asset = new \Assetic\Asset\FileAsset(TL_ROOT . '/assets/style2.css');
$GLOBALS['TL_CSS'][] = $asset;
Code:
Recoverable error: Object of class Assetic\Asset\FileAsset could not be converted to string in system/modules/theme-plus/classes/src/ThemePlus/ThemePlus.php on line 791
Und das Problem liegt in:
system/modules/theme-plus/classes/src/ThemePlus/ThemePlus.php
in Programmzeil 791:
PHP-Code:
$this->addAssetsToCollectionFromArray(
array_unique($GLOBALS['TL_CSS']),
'css',
true,
$collection,
$stylesheets,
$defaultFilters
);
weil:
Habt ihr eine Lösung oder ist das ein Bug?
Danke
Lesezeichen