Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Classes/Backend/LocalizationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* The TYPO3 project - inspiring people to share!
*/

use PDO;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository;
Expand Down Expand Up @@ -90,7 +91,7 @@ public function getRecordLocalizeSummary(ServerRequestInterface $request): Respo
$languageId
);

while ($row = $result->fetch()) {
while ($row = $result->fetch(PDO::FETCH_BOTH)) {
BackendUtility::workspaceOL('tt_content', $row, -99, true);
if (!$row || VersionState::cast($row['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)) {
continue;
Expand Down
3 changes: 2 additions & 1 deletion Classes/Backend/TtContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/

use PDO;
use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Query\QueryBuilder;
Expand Down Expand Up @@ -235,7 +236,7 @@ public function deleteDisallowedContainers(array &$params, string $itemUidList =
)
->execute();
$containers = [];
while ($container = $containerQuery->fetch()) {
while ($container = $containerQuery->fetch(PDO::FETCH_BOTH)) {
$containers[$container['uid']] = $container;
}
foreach ($params['items'] as $key => $container) {
Expand Down
8 changes: 4 additions & 4 deletions Classes/DataHandler/AbstractDataHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public function checkAndUpdateTranslatedElements(int $uid)
)
->setMaxResults(1)
->execute()
->fetch();
->fetch(PDO::FETCH_BOTH);
if (!empty($currentValues['l18n_parent'])) {
$originalUid = (int)$currentValues['uid'];
$queryBuilder = $this->getQueryBuilder();
Expand All @@ -248,7 +248,7 @@ public function checkAndUpdateTranslatedElements(int $uid)
)
->setMaxResults(1)
->execute()
->fetch();
->fetch(PDO::FETCH_BOTH);

if (is_array($currentValues)) {
$updateArray = $currentValues;
Expand Down Expand Up @@ -284,7 +284,7 @@ public function checkAndUpdateTranslatedElements(int $uid)
)
->execute();
$translatedElements = [];
while ($translatedElement = $translatedElementQuery->fetch()) {
while ($translatedElement = $translatedElementQuery->fetch(PDO::FETCH_BOTH)) {
$translatedElements[$translatedElement['uid']] = $translatedElement;
}
if (empty($translatedElements)) {
Expand All @@ -310,7 +310,7 @@ public function checkAndUpdateTranslatedElements(int $uid)
)
)
->execute();
while ($translatedContainer = $translatedContainerQuery->fetch()) {
while ($translatedContainer = $translatedContainerQuery->fetch(PDO::FETCH_BOTH)) {
$translatedContainers[$translatedContainer['sys_language_uid']] = $translatedContainer;
}
}
Expand Down
12 changes: 6 additions & 6 deletions Classes/DataHandler/AfterDatabaseOperations.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function setUnusedElements(array &$fieldArray)
)
->execute();
$childElementsInUnavailableColumns = [];
while ($childElementInUnavailableColumns = $childElementsInUnavailableColumnsQuery->fetch()) {
while ($childElementInUnavailableColumns = $childElementsInUnavailableColumnsQuery->fetch(PDO::FETCH_BOTH)) {
$childElementsInUnavailableColumns[] = $childElementInUnavailableColumns['uid'];
}
if (!empty($childElementsInUnavailableColumns)) {
Expand Down Expand Up @@ -202,7 +202,7 @@ public function setUnusedElements(array &$fieldArray)
)
->execute();
$childElementsInAvailableColumns = [];
while ($childElementInAvailableColumns = $childElementsInAvailableColumnsQuery->fetch()) {
while ($childElementInAvailableColumns = $childElementsInAvailableColumnsQuery->fetch(PDO::FETCH_BOTH)) {
$childElementsInAvailableColumns[] = $childElementInAvailableColumns['uid'];
}
if (!empty($childElementsInAvailableColumns)) {
Expand Down Expand Up @@ -287,7 +287,7 @@ public function setUnusedElements(array &$fieldArray)
)
->execute();
$elementsInUnavailableColumns = [];
while ($elementInUnavailableColumns = $elementsInUnavailableColumnsQuery->fetch()) {
while ($elementInUnavailableColumns = $elementsInUnavailableColumnsQuery->fetch(PDO::FETCH_BOTH)) {
$elementsInUnavailableColumns[] = $elementInUnavailableColumns['uid'];
}
if (!empty($elementsInUnavailableColumns)) {
Expand Down Expand Up @@ -330,7 +330,7 @@ public function setUnusedElements(array &$fieldArray)
)
->execute();
$elementsInAvailableColumns = [];
while ($elementInAvailableColumns = $elementsInAvailableColumnsQuery->fetch()) {
while ($elementInAvailableColumns = $elementsInAvailableColumnsQuery->fetch(PDO::FETCH_BOTH)) {
$elementsInAvailableColumns[] = $elementInAvailableColumns['uid'];
}
if (!empty($elementsInAvailableColumns)) {
Expand Down Expand Up @@ -383,7 +383,7 @@ public function setUnusedElements(array &$fieldArray)
)
->execute();
$subPageElementsInUnavailableColumns = [];
while ($subPageElementInUnavailableColumns = $subPageElementsInUnavailableColumnsQuery->fetch()) {
while ($subPageElementInUnavailableColumns = $subPageElementsInUnavailableColumnsQuery->fetch(PDO::FETCH_BOTH)) {
$subPageElementsInUnavailableColumns[] = $subPageElementInUnavailableColumns['uid'];
}
if (!empty($subPageElementsInUnavailableColumns)) {
Expand Down Expand Up @@ -429,7 +429,7 @@ public function setUnusedElements(array &$fieldArray)
)
->execute();
$subPageElementsInAvailableColumns = [];
while ($subPageElementInAvailableColumns = $subPageElementsInAvailableColumnsQuery->fetch()) {
while ($subPageElementInAvailableColumns = $subPageElementsInAvailableColumnsQuery->fetch(PDO::FETCH_BOTH)) {
$subPageElementsInAvailableColumns[] = $subPageElementInAvailableColumns['uid'];
}
if (!empty($subPageElementsInAvailableColumns)) {
Expand Down
2 changes: 1 addition & 1 deletion Classes/DataHandler/PreProcessFieldArray.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ public function checkForRootColumn(int $contentId): int
)
)
->execute()
->fetch();
->fetch(PDO::FETCH_BOTH);
if (!empty($parent)) {
if ($parent['tx_gridelements_container'] > 0) {
$colPos = $this->checkForRootColumn($parent['tx_gridelements_container']);
Expand Down
2 changes: 1 addition & 1 deletion Classes/DataHandler/ProcessCmdmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function execute_processCmdmap(
)
)
->execute()
->fetch();
->fetch(PDO::FETCH_BOTH);

if (!empty($originalContainer)) {
$containerUpdateArray[$originalContainer['tx_gridelements_container']] = -1;
Expand Down
2 changes: 1 addition & 1 deletion Classes/Helper/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public function getPidFromUid(int $uid = 0): int
)
)
->execute()
->fetch();
->fetch(PDO::FETCH_BOTH);
$pid = (int)$triggerElement['pid'];
return is_array($triggerElement) && $pid ? $pid : 0;
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Hooks/DrawItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ protected function collectContentData(string $shortcutItem, array &$collectedIte
)
->setMaxResults(1)
->execute()
->fetch();
->fetch(PDO::FETCH_BOTH);

if (!empty($this->extentensionConfiguration['overlayShortcutTranslation']) && $language > 0) {
$translatedItem = BackendUtility::getRecordLocalization('tt_content', $item['uid'], $language);
Expand Down
2 changes: 1 addition & 1 deletion Classes/PageLayoutView/ShortcutPreviewRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ protected function collectContentData(string $shortcutItem, array &$collectedIte
)
->setMaxResults(1)
->execute()
->fetch();
->fetch(PDO::FETCH_BOTH);

if (!empty($this->extensionConfiguration['overlayShortcutTranslation']) && $language > 0) {
$translatedItem = BackendUtility::getRecordLocalization('tt_content', $item['uid'], $language);
Expand Down
2 changes: 1 addition & 1 deletion Classes/Plugin/Gridelements.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public function getChildren(int $element = 0, int $pid = 0, string $csvColumns =
->execute();

$this->cObj->data['tx_gridelements_view_children'] = [];
while ($child = $children->fetch()) {
while ($child = $children->fetch(PDO::FETCH_BOTH)) {
// Versioning preview:
$sorting = $child['sorting'] ?? '';
$this->getTSFE()->sys_page->versionOL('tt_content', $child, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ protected function migrateField(array $row)
'storage',
$queryBuilder->createNamedParameter($storageUid, PDO::PARAM_INT)
)
)->execute()->fetch();
)->execute()->fetch(PDO::FETCH_BOTH);

// the file exists, the file does not have to be moved again
if (is_array($existingFileRecord)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ protected function migrateField(array $row)
'storage',
$queryBuilder->createNamedParameter($storageUid, PDO::PARAM_INT)
)
)->execute()->fetch();
)->execute()->fetch(PDO::FETCH_BOTH);

// the file exists, the file does not have to be moved again
if (is_array($existingFileRecord)) {
Expand Down
10 changes: 5 additions & 5 deletions Classes/Xclass/DatabaseRecordList10.php
Original file line number Diff line number Diff line change
Expand Up @@ -457,14 +457,14 @@ public function getTable($table, $id, $rowList = ''): string
$prevPrevUid = 0;
// Get first two rows and initialize prevPrevUid and prevUid if on page > 1
if ($this->firstElementNumber > 2 && $this->iLimit > 0) {
$row = $queryResult->fetch();
$row = $queryResult->fetch(PDO::FETCH_BOTH);
$prevPrevUid = -((int)$row['uid']);
$row = $queryResult->fetch();
$row = $queryResult->fetch(PDO::FETCH_BOTH);
$prevUid = $row['uid'];
}
$accRows = [];
// Accumulate rows here
while ($row = $queryResult->fetch()) {
while ($row = $queryResult->fetch(PDO::FETCH_BOTH)) {
if (!$this->isRowListingConditionFulfilled($table, $row)) {
continue;
}
Expand Down Expand Up @@ -567,7 +567,7 @@ public function getTable($table, $id, $rowList = ''): string
->from($table)
->andWhere(...$predicates)
->execute()
->fetch();
->fetch(PDO::FETCH_BOTH);

$lRow = is_array($tmpRow) ? $tmpRow : $lRow;
}
Expand Down Expand Up @@ -987,7 +987,7 @@ function ($attributeValue) {
->from($table)
->andWhere(...$predicates)
->execute()
->fetch();
->fetch(PDO::FETCH_BOTH);

$lRow = is_array($tmpRow) ? $tmpRow : $lRow;
}
Expand Down