Project

General

Profile

Actions

Bug #87593

closed

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

Added by Michael Staatz almost 6 years ago. Updated over 5 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

Actions

Also available in: Atom PDF