[TYPO3-core] RFC: minor optimisation of getRecordRaw()

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Thu Nov 30 16:18:25 CET 2006


Franz Holzinger schrieb:
> Hello Martin,
> 
> 
>>This is a SVN patch request.
>>
>>I noticed that t3lib_BEfunc::getRecordRaw() does not free the SQL
> 
> result. 
> 
>>While changing that I have also added a LIMIT to the query as only
> 
> the 
> 
>>first found record is used.
>>
>>+
>>+             if ($row)       return $row;
> 
> 
> because you touch this now:
> IMHO a function should always return a result. 

I agree, but did not want to think about any issues that may arise if the 
funcition returns anything in case of an error.

Your change will make it return FALSE (as a direct result of a failed 
mysql_fetch_assoc).

Masi


More information about the TYPO3-team-core mailing list