Project

General

Profile

Bug #18966 » 8728_v2.diff

Administrator Admin, 2009-10-15 11:00

View differences:

ChangeLog (Arbeitskopie)
2009-10-15 Rupert Germann <rupi@gmx.li>
* Fixed bug #8728: PHP Warning, if SQL error occurs in class t3lib_db in functions which depend on an existing resultset (thanks to Felix Oertel)
2009-10-14 Oliver Hader <oliver@typo3.org>
* Reverted bugfix #10050: Traversing back page records used in CONTENT object does not work on root page
t3lib/class.t3lib_db.php (Arbeitskopie)
* @return integer Number of resulting rows
*/
function sql_num_rows($res) {
$this->debug_check_recordset($res);
return mysql_num_rows($res);
if ($this->debug_check_recordset($res)) {
return mysql_num_rows($res);
} else {
return FALSE;
}
}
/**
......
* @return array Associative array of result row.
*/
function sql_fetch_assoc($res) {
$this->debug_check_recordset($res);
return mysql_fetch_assoc($res);
if ($this->debug_check_recordset($res)) {
return mysql_fetch_assoc($res);
} else {
return FALSE;
}
}
/**
......
* @return array Array with result rows.
*/
function sql_fetch_row($res) {
$this->debug_check_recordset($res);
return mysql_fetch_row($res);
if ($this->debug_check_recordset($res)) {
return mysql_fetch_row($res);
} else {
return FALSE;
}
}
/**
......
* @return boolean Returns TRUE on success or FALSE on failure.
*/
function sql_free_result($res) {
$this->debug_check_recordset($res);
return mysql_free_result($res);
if ($this->debug_check_recordset($res)) {
return mysql_free_result($res);
} else {
return FALSE;
}
}
/**
......
* @param integer Seek result number.
* @return boolean Returns TRUE on success or FALSE on failure.
*/
function sql_data_seek($res,$seek) {
$this->debug_check_recordset($res);
return mysql_data_seek($res,$seek);
function sql_data_seek($res, $seek) {
if ($this->debug_check_recordset($res)) {
return mysql_data_seek($res, $seek);
} else {
return FALSE;
}
}
/**
......
* @param integer Field index.
* @return string Returns the name of the specified field index
*/
function sql_field_type($res,$pointer) {
$this->debug_check_recordset($res);
return mysql_field_type($res,$pointer);
function sql_field_type($res, $pointer) {
if ($this->debug_check_recordset($res)) {
return mysql_field_type($res, $pointer);
} else {
return FALSE;
}
}
/**
(2-2/2)