Bug #87593

Install Tool > Wizard > Update sys_language records to use the newly sorting column

Added by Michael Staatz over 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Install Tool
Target version:
-
Start date:
2019-01-31
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

Hi all,

the Upgrade Wizard "Update sys_language records to use the newly sorting column" is iterating over the entries at table "sys_language". In our case there are 27 entries in that table.

Here is the code fragment from executeUpdate function :

$sortCounter = 128;
while ($languageRecord = $statement->fetch()) {
    // your code goes here

    $sortCounter *= 2;    
}

$sortCounter is to large for an INT (11) in the Database in our case. Which result in following error message:

Doctrine\DBAL\Exception\DriverException
An exception occurred while executing ‘UPDATE `sys_language` SET `sorting` = ? WHERE `uid` = ?’ with params [2147483648, 14]: Out of range value for column ‘sorting’ at row 1

When i initialize $sortCounter with a lower value, fx:

$sortCounter = 2;

all went fine.

Little Test Code to show the Value:

<?php
$x = 128;
for ($i = 1; $i <= 28; $i++) {
    $x *= 2;
};
var_dump($x);
// Result => 34359738368

Best,
Michael

#1

Updated by Gerrit Code Review over 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59772

#2

Updated by Markus Klein over 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#3

Updated by Benni Mack about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF