[TYPO3-core] FYI: #14632: Caching framework memcached backend: No exception thrown if set() fails and wrong boolean comparison

Christian Kuhn lolli at schwarzbu.ch
Sun Jun 6 15:54:55 CEST 2010


FYI: Attached patch was committed to trunk rev. 7823, 4.3 rev. 7824.

Type: bug, failing unit tests

Branches: 4.3 & trunk

BT: http://bugs.typo3.org/view.php?id=14632

Problem:
No exception in memcachedbackend->set() is thrown if memcache->set() 
fails, so test setThrowsExceptionIfConfiguredServersAreUnreachable() fails.

Adding the Exception reveals a problem with the $success handling and 
test largeDataIsStored() fails: Bitwise & of boolean parameters returns 
an integer, so 'if ($success === TRUE) {' is too strict.

Solution:
Add exception if memcache->set() was not successful and change bitwise 
$success handling to logical comparison.

Notes:
Reported to FLOW3 with http://forge.typo3.org/issues/8074

Regards
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 14632_01.diff
Type: text/x-patch
Size: 1232 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100606/a160b402/attachment.bin>


More information about the TYPO3-team-core mailing list