Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/zendframework/zendframework#7065-cas-apc-support…
Browse files Browse the repository at this point in the history
…-for-integers-in-cache' into develop

Close zendframework/zendframework#7065
Forward port zendframework/zendframework#7065
  • Loading branch information
Ocramius committed Dec 31, 2014
4 parents 27d4592 + 25da9fb + 624cae1 + cfaa0ed commit 7ac441e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Storage/Adapter/Apc.php
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,10 @@ protected function normalizeMetadata(array & $metadata)
*/
protected function internalCheckAndSetItem(& $token, & $normalizedKey, & $value)
{
return apc_cas($normalizedKey, $token, $value);
if (is_int($token) && is_int($value)) {
return apc_cas($normalizedKey, $token, $value);
}

return parent::internalCheckAndSetItem($token, $normalizedKey, $value);
}
}

0 comments on commit 7ac441e

Please sign in to comment.