Hallo,
Ich habe ein Problem mit FileAsset:
Dieser Code funktioniert:
Mit diesem bekomme ich eine Fehlermeldung:
Und das Problem liegt in:
system/modules/theme-plus/classes/src/ThemePlus/ThemePlus.php
in Programmzeil 791:
weil:
Habt ihr eine Lösung oder ist das ein Bug?
Danke
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;
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
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
);
http://de3.php.net/manual/de/function.array-unique.php
Hinweis: Zwei Elemente werden nur dann als gleich angesehen, wenn (string) $elem1 === (string) $elem2. In Worten: Wenn die String-Repräsentation die gleiche ist. Das erste Element wird verwendet.
Hinweis: Zwei Elemente werden nur dann als gleich angesehen, wenn (string) $elem1 === (string) $elem2. In Worten: Wenn die String-Repräsentation die gleiche ist. Das erste Element wird verwendet.
Danke
Kommentar