[TYPO3-core] RFC: Bug #4555: double posts do not get found

Michael Stucki michael at typo3.org
Sat Nov 25 12:05:54 CET 2006


Hi Franz,

> Problem:
> The double post identifier key is stored as a UNSIGNED INT 32 Bit (4
> Byte) - function calcDoublePostKey. In the query however this key is
> converted into PHP int, which is a different value in many cases. This
> happens with integers are larger than 2147483647. Then it would be
> converted into a negative integer.

I wonder how this could be tested? Did you click 500 times? ;-)

> Solution:
> Change the query to not convert the key into a signed integer.

I slowly begin to understand the problem: You have removed the intval() wrap 
because the value inside could be more than this:

The $key parameter is coming from ->calcDoublePostKey() which returns a 
hexdec() result. According to PHP.net this is a float, not int. (They are 
both private functions, so we can trust that this is fine.)

This has nothing to do with the database, it's just the comparison value which 
is calculated wrong!

> Branches: TYPO3_4-0 & Trunk

Untested, but +1
Do _not_ commit to TYPO3_4-0 unless 4.0.3 is finished (RC freeze!)

Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20061125/5ca94a22/attachment.pgp 


More information about the TYPO3-team-core mailing list