litespeedtech / litespeedtech/lscache-drupal

Undefined variable $ncookies and creation of dynamic property after Commit 46f0bfe

Open Beginner friendly
#43 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
15
Forks
19
PR merge metrics
No merged PRs in 30d

Description

After updating the lscache module on our drupal sites, we've started seeing warnings regarding an undefined variable in LSCacheBackend.php file.

Warning: Undefined variable $ncookies in Drupal\lite_speed_cache\Cache\LSCacheBackend->__construct() (line 28 of public_html/modules/contrib/lscache-drupal/src/Cache/LSCacheBackend.php)

as well as

Deprecated function: Creation of dynamic property Drupal\lite_speed_cache\Cache\LSCacheBackend::$ is deprecated in Drupal\lite_speed_cache\Cache\LSCacheBackend->__construct() (line 28 of public_html/modules/contrib/lscache-drupal/src/Cache/LSCacheBackend.php)

Can be resolved by fixing the typo in the constructor from $this->$ncookies to $this->ncookies

See also: 46f0bfe

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open public_html/modules/contrib/lscache-drupal/src/Cache/LSCacheBackend.php and inspect the constructor around line 28, especially the assignment identified in the issue. Correct the variable reference so the cache-cookie property is assigned properly, then verify that the undefined-variable and dynamic-property warnings no longer occur.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
82/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.