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

[HttpFoundation] Fix setting session-related ini settings#27067

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
Tobion merged 1 commit intosymfony:2.7frome-moe:bugfix/27011
Apr 28, 2018

Conversation

@e-moe
Copy link
Contributor

QA
Branch?2.7
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#27011
LicenseMIT
Doc PRn/a

Added missed optioncache_expire
Fixed typo inupload_progress.min_freq
Fixed ini_set name prefix ofurl_rewriter.tags

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

thanks for the PR, here are some minor comments


$validOptions =array_flip(array(
'cache_limiter','cookie_domain','cookie_httponly',
'cache_limiter','cache_expire','cookie_domain','cookie_httponly',

Choose a reason for hiding this comment

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

can you move it after cookie_domain? would make it alpha order

if (isset($validOptions[$key])) {
ini_set('session.'.$key,$value);
// All options starts with 'session.' except 'url_rewriter.tags'
$name ='url_rewriter.tags' !=$key ?'session.'.$key :$key;

Choose a reason for hiding this comment

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

should use!==

ini_set('session.'.$key,$value);
// All options starts with 'session.' except 'url_rewriter.tags'
$name ='url_rewriter.tags' !=$key ?'session.'.$key :$key;
ini_set($name,$value);

Choose a reason for hiding this comment

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

let's inline?
ini_set('url_rewriter.tags' !== $key ? 'session.'.$key : $key, $value);

foreach ($optionsas$key =>$value) {
if (isset($validOptions[$key])) {
ini_set('session.'.$key,$value);
// All options starts with 'session.' except 'url_rewriter.tags'

Choose a reason for hiding this comment

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

I think we should remove this comment as it just duplicates what the code tells quite evidently

$this->getStorage($options);

$this->assertEquals('a=href',ini_get('url_rewriter.tags'));
$this->assertEquals(200,ini_get('session.cache_expire'));

Choose a reason for hiding this comment

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

please use assertSame in both cases

@nicolas-grekasnicolas-grekas changed the titleFix #27011: Session ini_set bug[HttpFoundation] Fix setting session-related ini settingsApr 26, 2018

$this->getStorage($options);

$this->assertEquals('a=href',ini_get('url_rewriter.tags'));

Choose a reason for hiding this comment

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

This fails on HHVM. I suggest to skip this test on HHVM.:

if (defined('HHVM_VERSION')) {$this->markTestSkipped('HHVM is not handled in this test case.');}

@e-moe
Copy link
ContributorAuthor

@nicolas-grekas , thanks for your review! updated

@Tobion
Copy link
Contributor

Good catch, thanks@e-moe.

@TobionTobion merged commit64a0f23 intosymfony:2.7Apr 28, 2018
Tobion added a commit that referenced this pull requestApr 28, 2018
…(e-moe)This PR was merged into the 2.7 branch.Discussion----------[HttpFoundation] Fix setting session-related ini settings| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#27011| License       | MIT| Doc PR        | n/aAdded missed option `cache_expire`Fixed typo in `upload_progress.min_freq`Fixed ini_set name prefix of `url_rewriter.tags`Commits-------64a0f23Fix#27011: Session ini_set bug
This was referencedApr 30, 2018
@fabpotfabpot mentioned this pull requestMay 21, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

+1 more reviewer

@TobionTobionTobion approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

2.7

Development

Successfully merging this pull request may close these issues.

4 participants

@e-moe@Tobion@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp