Use "json_encode" and "json_decode" instead of unserialize
This commit is contained in:
parent
4539377113
commit
36e26c6f09
2 changed files with 4 additions and 4 deletions
|
@ -206,7 +206,7 @@ class Connection extends LDAPUtility {
|
|||
}
|
||||
$key = $this->getCacheKey($key);
|
||||
|
||||
return unserialize(base64_decode($this->cache->get($key)));
|
||||
return json_decode(base64_decode($this->cache->get($key)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -240,7 +240,7 @@ class Connection extends LDAPUtility {
|
|||
return null;
|
||||
}
|
||||
$key = $this->getCacheKey($key);
|
||||
$value = base64_encode(serialize($value));
|
||||
$value = base64_encode(json_encode($value));
|
||||
$this->cache->set($key, $value, $this->configuration->ldapCacheTTL);
|
||||
}
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@ abstract class Proxy {
|
|||
}
|
||||
$key = $this->getCacheKey($key);
|
||||
|
||||
return unserialize(base64_decode($this->cache->get($key)));
|
||||
return json_decode(base64_decode($this->cache->get($key)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -185,7 +185,7 @@ abstract class Proxy {
|
|||
return;
|
||||
}
|
||||
$key = $this->getCacheKey($key);
|
||||
$value = base64_encode(serialize($value));
|
||||
$value = base64_encode(json_encode($value));
|
||||
$this->cache->set($key, $value, '2592000');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue