Commit 9f0833d2 authored by Nicole Cordes's avatar Nicole Cordes Committed by Christian Kuhn
Browse files

[BUGFIX] t3lib_db::exec_SELECTgetRows method annotation

The function returns a NULL value if a sql error occurs.

Change-Id: Ic508aa5ba2034c0a230f5fad56690979ed576bf4
Fixes: #39417
Releases: 6.0, 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/13386
Reviewed-by: Oliver Klee
Reviewed-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
parent b2022626
......@@ -271,7 +271,7 @@ class t3lib_DB {
* @param string $orderBy See exec_SELECTquery()
* @param string $limit See exec_SELECTquery()
* @param string $uidIndexField If set, the result array will carry this field names value as index. Requires that field to be selected of course!
* @return array Array of rows.
* @return array|NULL Array of rows, or NULL in case of SQL error
*/
function exec_SELECTgetRows($select_fields, $from_table, $where_clause, $groupBy = '', $orderBy = '', $limit = '', $uidIndexField = '') {
$res = $this->exec_SELECTquery($select_fields, $from_table, $where_clause, $groupBy, $orderBy, $limit);
......@@ -281,7 +281,6 @@ class t3lib_DB {
if (!$this->sql_error()) {
$output = array();
if ($uidIndexField) {
while ($tempRow = $this->sql_fetch_assoc($res)) {
$output[$tempRow[$uidIndexField]] = $tempRow;
......@@ -292,7 +291,10 @@ class t3lib_DB {
array_pop($output);
}
$this->sql_free_result($res);
} else {
$output = NULL;
}
return $output;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment