litespeedtech / litespeedtech/lscache-drupal
Undefined variable $ncookies and creation of dynamic property after Commit 46f0bfe
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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