Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The increment in ArrayStore #20153

Closed
LaoQi opened this issue Jul 19, 2017 · 1 comment
Closed

The increment in ArrayStore #20153

LaoQi opened this issue Jul 19, 2017 · 1 comment

Comments

@LaoQi
Copy link

LaoQi commented Jul 19, 2017

  • Laravel Version: lastest
  • PHP Version:7.0
  • Database Driver & Version:

Description:

The method increment in cache\ArrayStore has a bug that array index out of range

 public function increment($key, $value = 1)
    {
        // $key not exist
        // if (!isset($this->storage[$key])) $this->storage[$key] = 0;
        $this->storage[$key] = ((int) $this->storage[$key]) + $value;

        return $this->storage[$key];
    }

https://github.com/laravel/framework/blob/5.4/src/Illuminate/Cache/ArrayStore.php#L53

@themsaid
Copy link
Member

handled in #20156

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants