[TYPO3-dev] http://bugs.typo3.org/view.php?id=7591

Tobias Pierschel tp at netinventors.de
Tue Nov 23 14:23:17 CET 2010


Hi,
what about this bug http://bugs.typo3.org/view.php?id=7591 ?
We ran into this issue and found that there is already a working patch which is not commited to the core yet.
In the meantime (T3 - 4.4.4) the line-numbers are not corret and there is  also al little flaw

Row: 430
  /*
$GLOBALS['TYPO3_DB']->exec_UPDATEquery('cache_pagesection', 'page_id=' . intval($GLOBALS['TSFE']->id) . ' AND mpvar_hash=' . $mpvarHash, $dbFields);
if ($GLOBALS['TYPO3_DB']->sql_affected_rows() == 0) {
	$dbFields['page_id'] = intval($GLOBALS['TSFE']->id);
	$dbFields['mpvar_hash'] = $mpvarHash;
	$GLOBALS['TYPO3_DB']->exec_INSERTquery('cache_pagesection', $dbFields);
	}
*/

into:


$dbFields = $GLOBALS['TYPO3_DB']->fullQuoteArray($dbFields, 'cache_pagesection', $noQuote=FALSE);
$query = 'INSERT INTO cache_pagesection SET page_id=' . intval($GLOBALS['TSFE']->id) . ', mpvar_hash=' . $mpvarHash . ', content=' . $dbFields['content'] . ', tstamp=' . $dbFields['tstamp'] .' ON DUPLICATE KEY UPDATE content='.$dbFields['content'] . ', tstamp=' . $dbFields['tstamp'];
$res = $GLOBALS['TYPO3_DB']->sql_query($query);

Cheers
Tobi




More information about the TYPO3-dev mailing list