Project

General

Profile

Actions

Bug #24104

closed

Replace exec_SELECTgetRows with exec_SELECTgetSingleRow whenever a single record is expected

Added by Jo Hasenau about 14 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2010-11-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In the core the method exec_SELECTgetRows is used to fetch records from the DB. Often this method is uses, even though there is just one single record expected as a result.

Attached patch replaces exec_SELECT-getRows with exec_SELECTgetSingleRow for each case dealing with single records.

Indicators are:
list(blah) is used in front of exec_SELECTgetRows
$blah0 is used only
array_shift is used and the rest of the array stays untouched
LIMIT 1 is used within the method

and the array is not used with any foreach loop.

(issue imported from #M16445)


Files

replace_getRows_with_getSingleRow.diff (26.5 KB) replace_getRows_with_getSingleRow.diff Administrator Admin, 2010-11-17 15:33
16445_02.diff (24.6 KB) 16445_02.diff Administrator Admin, 2010-11-26 19:09

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #24229: Login via OpenID is impossible after last SVN CheckoutClosedSteffen Gebert2010-11-29

Actions
Actions #1

Updated by Christian Kuhn almost 14 years ago

trunk rev. 9652.

Actions #2

Updated by Susanne Moog over 13 years ago

  • Target version deleted (4.5.0)
Actions

Also available in: Atom PDF