You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem is that $table_data['Data_length'] and $table_data['Index_length'] are of type string,
but $table_data['Data_length'] + $table_data['Index_length'] is an integer
Usually, strtolower should be able to handle this anyway.
But not here due to the declare(strict_types=1); starting the files
Suggestion how to fix
Casting explicitly the resulting sum as a string with a strval() ?
williamdes
changed the title
[phpMyAdmin 5.0.1] Uncaught TypeError when sorting tables by size
[phpMyAdmin 5.0.1] Uncaught TypeError when sorting tables by size or by rows
Feb 14, 2020
Describe the bug
Trying to sort a database's tables by size returns a PHP error of type:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The tables should be sorted by size
Actual behavior
Error message is displayed
Server configuration
Client configuration
Additional info
Tried to debug a bit.
It happens on https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/classes/DatabaseInterface.php#L717-L719
Problem is that
$table_data['Data_length']and$table_data['Index_length']are of type string,but
$table_data['Data_length'] + $table_data['Index_length']is an integerUsually,
strtolowershould be able to handle this anyway.But not here due to the
declare(strict_types=1);starting the filesSuggestion how to fix
Casting explicitly the resulting sum as a string with a
strval()?The text was updated successfully, but these errors were encountered: