FILE: C:\xampp_new\htdocs\contribute\web\modules\custom\umami_analytics\src\JavascriptLocalCache.php
----------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------
130 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------------

Comments

Harsh panchal created an issue. See original summary.

Harsh panchal’s picture

Category: Task » Bug report
Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new553 bytes

I have fixed this issue and providing a patch.

pivica’s picture

StatusFileSize
new551 bytes

@Harsh panchal thx for the issue report. The static analysis is correct but your patch has a small error, instead of

$query_string = '?' . ($this->state()->get('system.css_js_query_string') ?: '0');

it should be

$query_string = '?' . ($this->state->get('system.css_js_query_string') ?: '0');

because `state` is a class property and not it's method.

Attaching a patch that is fixing this.

pivica’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.