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

[Lock] Fixed PdoStore::putOffExpiration(), PdoStore::getHashedKey()#29260

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
nicolas-grekas merged 1 commit intosymfony:masterfrompprishchepa:master
Nov 24, 2018

Conversation

@pprishchepa
Copy link
Contributor

@pprishchepapprishchepa commentedNov 19, 2018
edited
Loading

QA
Branch?master
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?It seems no
Fixed tickets
LicenseMIT
Doc PR
  1. Fixed PDO Statement exception in PdoStore::putOffExpiration():
 An exception occurred while executing 'UPDATE lock_keys SET key_expiration = UNIX_TIMESTAMP() + 10, key_token = :token WHERE key_id = :id AND (key_token = :token OR key_expiration <= UNIX_TIMESTAMP())' with params ["dcfc5ff369bc1896563    325c2e90478154eb670f6b6ebad3617e946ecb1f81517", "FRJOnftxRwPIgIRVb4EpOIVFwNjTmx0fwkBSTVJdViI="]:                                                                                                                                                                                                                                                                                                                                                                                            SQLSTATE[HY093]: Invalid parameter number
  1. Added explicit castingKey tostring in getHashedKey() to avoid error withstrict_types enabled.

@nicolas-grekas
Copy link
Member

But we don't enable strict types, so this change is not necessary!

@pprishchepa
Copy link
ContributorAuthor

@nicolas-grekas ok, but what about PdoStore::putOffExpiration() fix?

@nicolas-grekas
Copy link
Member

I don't get them. Can't we reference the same parameter twice? Can you give a few more hints please?

@pprishchepa
Copy link
ContributorAuthor

Yes, according tohttp://php.net/pdo.prepare

You must include a unique parameter marker for each value you wish to pass in to the statement when you call PDOStatement::execute(). You cannot use a named parameter marker of the same name more than once in a prepared statement, unless emulation mode is on.

@nicolas-grekas
Copy link
Member

Thank you @PavelPrischepa.

pprishchepa and duozersk reacted with hooray emoji

@nicolas-grekasnicolas-grekas merged commita639301 intosymfony:masterNov 24, 2018
nicolas-grekas added a commit that referenced this pull requestNov 24, 2018
…shedKey() (PavelPrischepa)This PR was merged into the 4.2-dev branch.Discussion----------[Lock] Fixed PdoStore::putOffExpiration(), PdoStore::getHashedKey()| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | It seems no| Fixed tickets || License       | MIT| Doc PR        |1. Fixed PDO Statement exception in PdoStore::putOffExpiration():``` An exception occurred while executing 'UPDATE lock_keys SET key_expiration = UNIX_TIMESTAMP() + 10, key_token = :token WHERE key_id = :id AND (key_token = :token OR key_expiration <= UNIX_TIMESTAMP())' with params ["dcfc5ff369bc1896563  325c2e90478154eb670f6b6ebad3617e946ecb1f81517", "FRJOnftxRwPIgIRVb4EpOIVFwNjTmx0fwkBSTVJdViI="]:  SQLSTATE[HY093]: Invalid parameter number```2. Added explicit casting `Key` to `string` in getHashedKey() to avoid error with `strict_types` enabled.Commits-------a639301 [Lock] Fixed PDOStatement exception "Invalid parameter number" in putOffExpiration()
samnela pushed a commit to samnela/symfony that referenced this pull requestNov 25, 2018
…::getHashedKey() (PavelPrischepa)This PR was merged into the 4.2-dev branch.Discussion----------[Lock] Fixed PdoStore::putOffExpiration(), PdoStore::getHashedKey()| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | It seems no| Fixed tickets || License       | MIT| Doc PR        |1. Fixed PDO Statement exception in PdoStore::putOffExpiration():``` An exception occurred while executing 'UPDATE lock_keys SET key_expiration = UNIX_TIMESTAMP() + 10, key_token = :token WHERE key_id = :id AND (key_token = :token OR key_expiration <= UNIX_TIMESTAMP())' with params ["dcfc5ff369bc1896563  325c2e90478154eb670f6b6ebad3617e946ecb1f81517", "FRJOnftxRwPIgIRVb4EpOIVFwNjTmx0fwkBSTVJdViI="]:  SQLSTATE[HY093]: Invalid parameter number```2. Added explicit casting `Key` to `string` in getHashedKey() to avoid error with `strict_types` enabled.Commits-------a639301 [Lock] Fixed PDOStatement exception "Invalid parameter number" in putOffExpiration()
This was referencedNov 26, 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

Assignees

No one assigned

Projects

None yet

Milestone

4.2

Development

Successfully merging this pull request may close these issues.

3 participants

@pprishchepa@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp