[TYPO3-core] Checking return values of SQL query - see bug#3794

Dmitry Dulepov dmitry at typo3.org
Fri Oct 13 14:36:06 CEST 2006


Hi!

Martin Kutschker wrote:
> Bug http://bugs.typo3.org/view.php?id=3794 complains about a PHP warning 
> in  t3lib\class.t3lib_page.php:getHash().
> 
> It's a classic SELECT and fetch but don't check result. Is it worth the 
> hassle to check if the result is a valid handle (ie not FALSE)?

Yes. Or alternatively use exec_SELECTgetRows() and check it for false. 
Advantage: less code. Disadvantage: exec_SELECTgetRows() does not free 
record set.

-- 
Dmitry Dulepov

Web: http://typo3bloke.net/
Skype: callto:liels_bugs

"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)



More information about the TYPO3-team-core mailing list