Skip to content

[#16705] - refactor: remove has() check in doGet().#16709

Merged
niden merged 7 commits into
phalcon:5.0.xfrom
noone-silent:T16705-remove-has-check
Mar 20, 2025
Merged

[#16705] - refactor: remove has() check in doGet().#16709
niden merged 7 commits into
phalcon:5.0.xfrom
noone-silent:T16705-remove-has-check

Conversation

@noone-silent

Copy link
Copy Markdown
Contributor

Hello!

In raising this pull request, I confirm the following:

  • I have read and understood the Contributing Guidelines
  • I have checked that another pull request for this purpose does not exist
  • I wrote some tests for this PR
  • I have updated the relevant CHANGELOG
  • I have created a PR for the documentation about this change

Small description of change: Remove the has() check in doGet()

Thanks

Comment thread phalcon/Storage/Adapter/AbstractAdapter.zep
Comment thread phalcon/Storage/Adapter/AbstractAdapter.zep Outdated
Comment thread phalcon/Storage/Adapter/Apcu.zep Outdated
@noone-silent noone-silent requested a review from niden March 8, 2025 05:19
@niden

niden commented Mar 19, 2025

Copy link
Copy Markdown
Member

@noone-silent Can you rebase please. The changelog entry needs to go to 5.9.1

This looks good.

@noone-silent

Copy link
Copy Markdown
Contributor Author

@noone-silent Can you rebase please. The changelog entry needs to go to 5.9.1

This looks good.

done

@niden niden merged commit acd51de into phalcon:5.0.x Mar 20, 2025
@niden

niden commented Mar 20, 2025

Copy link
Copy Markdown
Member

Thank you @noone-silent

@Sn0wCrack

Copy link
Copy Markdown

I've created a bug report in relation to this one, but this is causing issues with adapters that do not do existence checks within themselves or return false naturally.

One issue here is the cached value is actually a PHP false then it will always return the default value, which is null. In a loose checked world this is probably fine, but in a strict checked application this may cause problems.

@niden I think this may need to be reverted unless a quick fix can be implemented.

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

Successfully merging this pull request may close these issues.

4 participants