mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #10894 from lekoala/patch-43
Ensure cache key only contains valid characters
This commit is contained in:
commit
0e74e355eb
@ -44,7 +44,7 @@ class VersionProvider
|
|||||||
*/
|
*/
|
||||||
public function getVersion()
|
public function getVersion()
|
||||||
{
|
{
|
||||||
$key = sprintf('%s-%s', $this->getComposerLockPath(), 'all');
|
$key = preg_replace("/[^A-Za-z0-9]/", '_', $this->getComposerLockPath() . '_all');
|
||||||
$version = $this->getCachedValue($key);
|
$version = $this->getCachedValue($key);
|
||||||
if ($version) {
|
if ($version) {
|
||||||
return $version;
|
return $version;
|
||||||
@ -80,7 +80,7 @@ class VersionProvider
|
|||||||
*/
|
*/
|
||||||
public function getModuleVersion(string $module): string
|
public function getModuleVersion(string $module): string
|
||||||
{
|
{
|
||||||
$key = sprintf('%s-%s', $this->getComposerLockPath(), $module);
|
$key = preg_replace("/[^A-Za-z0-9]/", '_', $this->getComposerLockPath() . '_' . $module);
|
||||||
$version = $this->getCachedValue($key);
|
$version = $this->getCachedValue($key);
|
||||||
if ($version) {
|
if ($version) {
|
||||||
return $version;
|
return $version;
|
||||||
|
Loading…
Reference in New Issue
Block a user