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

apcu_fetch returns success for missing keys #509

Open
boesing opened this issue Jun 15, 2024 · 2 comments
Open

apcu_fetch returns success for missing keys #509

boesing opened this issue Jun 15, 2024 · 2 comments

Comments

@boesing
Copy link

boesing commented Jun 15, 2024

Hey there,

I am using APCu on PHP 8.1 with v5.1.23.
When I execute apcu_fetch with a key which does not exist, $success flag is being set to true and false is returned.

$value = apcu_fetch(bin2hex(random_bytes(10)), $success);
var_dump($value, $success);
bool(false)
bool(true)

Do I miss something? AFAIR apcu_fetch returned false on success when cache key did not exist?

@nikic
Copy link
Collaborator

nikic commented Jun 16, 2024

I can't reproduce this. For me this prints false two times.

@boesing
Copy link
Author

boesing commented Jun 16, 2024

Maybe this is related to MacOS and/or patches of shivammathur. Will double check that. Sorry for creating noise.

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