Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Error in AddJs/AddCss functions in Assets.php

Started by Muut Archive 11 years ago · 4 replies · 327 views
11 years ago

I was trying to add a js file using the AddJs method of the Assets class. There is an issue with the parameter $pipeline, specifically line 320 in Assets.php:

  • 'pipeline' => $pipeline ?: true *

This always evaluates to true, even if $pipeline is set to false. I had to change this line to:

  • is_null($pipeline) ? true : $pipeline *

A similar error is present in the method AddCss.

Best,
Antony

11 years ago

Pipeline should be set to either true or false in your configuration. It should not be left blank or null.

11 years ago

I was setting it to false when calling the method, but it's set to true when assigned to the array $data, it's impossible to set it to false.

11 years ago

Ok will do, thanks for having a look.

Best,
Antony

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1350 9 years ago
Archive · by Muut Archive, 9 years ago
2 935 9 years ago
Archive · by Muut Archive, 9 years ago
2 4061 9 years ago
Archive · by Muut Archive, 9 years ago
1 2948 9 years ago
Archive · by Muut Archive, 9 years ago
3 1119 9 years ago