Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas commentedNov 20, 2018
But we don't enable strict types, so this change is not necessary! |
pprishchepa commentedNov 21, 2018
@nicolas-grekas ok, but what about PdoStore::putOffExpiration() fix? |
nicolas-grekas commentedNov 22, 2018
I don't get them. Can't we reference the same parameter twice? Can you give a few more hints please? |
pprishchepa commentedNov 23, 2018
Yes, according tohttp://php.net/pdo.prepare
|
nicolas-grekas commentedNov 24, 2018
Thank you @PavelPrischepa. |
…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()
…::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()
Uh oh!
There was an error while loading.Please reload this page.
Keytostringin getHashedKey() to avoid error withstrict_typesenabled.