Bugfixing bad UIDs for PConfig

This commit is contained in:
Philipp Holzer 2019-07-15 21:11:38 +02:00
parent ebf00e32a1
commit d5de5b6789
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
5 changed files with 62 additions and 20 deletions

View file

@ -34,7 +34,7 @@ class PConfigCache
* @param int $uid
* @param array $config
*/
public function load(int $uid, array $config)
public function load($uid, array $config)
{
$categories = array_keys($config);
@ -62,7 +62,7 @@ class PConfigCache
*
* @return null|string The value of the config entry or null if not set
*/
public function get(int $uid, string $cat, string $key = null)
public function get($uid, string $cat, string $key = null)
{
if (isset($this->config[$uid][$cat][$key])) {
return $this->config[$uid][$cat][$key];
@ -85,7 +85,7 @@ class PConfigCache
*
* @return bool Set successful
*/
public function set(int $uid, string $cat, string $key, $value)
public function set($uid, string $cat, string $key, $value)
{
if (!isset($this->config[$uid]) || !is_array($this->config[$uid])) {
$this->config[$uid] = [];
@ -116,7 +116,7 @@ class PConfigCache
*
* @return bool true, if deleted
*/
public function delete(int $uid, string $cat, string $key)
public function delete($uid, string $cat, string $key)
{
if (isset($this->config[$uid][$cat][$key])) {
unset($this->config[$uid][$cat][$key]);