[TYPO3-core] RFC: #8092: defect wsid check in workspace-overlay delivering wrong record versions from DB!

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Fri Apr 11 13:57:26 CEST 2008


Steffen Kamper schrieb:
> "Martin Kutschker" <Martin.Kutschker at n0spam-blackbox.net> schrieb im 
> Newsbeitrag 
> news:mailman.1.1207913560.10099.typo3-team-core at lists.netfielders.de...
>> Franz Koch schrieb:
>>> Solution:
>>> correct the operator in the if-statement of the wsid-check from '!==' to 
>>> '!='. Patch is provided in bugreport.
>> Why is this the solution? The original check assumed that wsid is an 
>> integer. After your change an implict type conversion occurs.
>>
> 
> i don't understand. If param is omitted, it's set to -99, otherwise it's an 
> integer.

But -99 is an integer.

>  // Check if workspace is different from zero and record is set:
>   if ($wsid!==0 && is_array($row)) {
> 
> check for different to zero is !=0 in this case, or !intval($wsid). And 
> Franz tested and got right result after this change, so imho it's correct?

I want to know why either workspaceOL is called with $wsid being a string 
or why $GLOBALS['BE_USER']->workspace contains a string. Neither of that 
that shouldn't happen.

Masi


More information about the TYPO3-team-core mailing list