[TYPO3-commerce] RFC: #10433: Ressource leak in tx_commerce_product::get_Articles_by_AttributeArray

Michael Knabe t3 at aafhh.de
Tue Oct 26 13:43:22 CEST 2010


Hi Ingo,

> $result is not set, if there is an SQL Error. SQL Errors can be caused by the code, but can also be caused by the database and other reasons, which are not in control by commerce. So I want to have a check if $result is set.
$result is set to FALSE then which is not a problem as sql_fetch_assoc 
handles it nicely by writing a devlog entry which is IMHO cleaner than 
ignoring the error silently as the current code does.
Actually, if your database is not reachable you have bigger problems 
than commerce failing here.
BTW, if this query returns nothing due to a defective sql syntax or 
database, you get a fatal error in tx_commerce_pibase anyway.

Cheers, Michael


More information about the TYPO3-team-commerce mailing list