Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Ignore memcached missing key error on session destroy#23752

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@jderusse
Copy link
Member

@jderussejderusse commentedAug 1, 2017
edited
Loading

QA
Branch?2.7
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#18574
LicenseMIT
Doc PRNA

Since PHP 7 session_regenerate_id triggers a warning when the session is not started.

This PR, changes the behaviours of session_destroy in theMemcachedSessionHandler by returning true when the user try to delete a non-existing session.

Other handler:

  • LegacyPdoSessionHandler => don't check if key exists
  • MongoDbSessionHandler => don't check if key exists
  • NullSessionHandler => always true
  • PdoSessionHandler => don't check if key exists

return$this->memcached->delete($this->prefix.$sessionId);
$result =$this->memcached->delete($this->prefix.$sessionId);

if (!$result &&$this->memcached->getResultCode() == \Memcached::RES_NOTFOUND) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

return $result || $this->memcached->getResultCode() == \Memcached::RES_NOTFOUND;

@jderussejderusseforce-pushed thefix/memcached-session-handler branch fromd69ff13 to29538b6CompareAugust 7, 2017 07:30
@fabpot
Copy link
Member

Thank you@jderusse.

@fabpotfabpot merged commit29538b6 intosymfony:2.7Aug 9, 2017
fabpot added a commit that referenced this pull requestAug 9, 2017
…russe)This PR was merged into the 2.7 branch.Discussion----------Ignore memcached missing key error on session destroy| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#18574| License       | MIT| Doc PR        | NASince PHP 7 session_regenerate_id triggers a warning when the session is not started.This PR, changes the behaviours of session_destroy in the `MemcachedSessionHandler` by returning true when the user try to delete a non-existing session.Other handler:- LegacyPdoSessionHandler  => don't check if key exists- MongoDbSessionHandler  => don't check if key exists- NullSessionHandler => always true- PdoSessionHandler => don't check if key existsCommits-------29538b6 Ignore memcached missing key error on dession destroy
This was referencedAug 28, 2017
@jderussejderusse deleted the fix/memcached-session-handler branchAugust 2, 2019 12:16
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

2.7

Development

Successfully merging this pull request may close these issues.

5 participants

@jderusse@fabpot@nicolas-grekas@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp