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
The $index should not contain position 0 as it depens on mysql sorting while getting indexes.
Steps to reproduce
Create a table with more and 3 indexes and try to edit such BREAD, it will crash due to
Undefined array key 0 at /var/www/vendor/tcg/voyager/src/Database/Schema/SchemaManager.php:76
Expected behavior
be certain to have $index[0] or a check to its existance
Screenshots
No response
Additional context
you should use array_values or check if !empty($indexes[0]['type']))
The text was updated successfully, but these errors were encountered:
the problem is in /var/www/vendor/tcg/voyager/src/Database/Schema/SchemaManager.php:76
public static function describeTable($tableName)
{
$columns = Schema::getColumnListing($tableName);
Laravel version
11.30.0
PHP version
8.3.12
Voyager version
v1.8.0
Database
MySql 8.4
Description
The $index should not contain position 0 as it depens on mysql sorting while getting indexes.
Steps to reproduce
Create a table with more and 3 indexes and try to edit such BREAD, it will crash due to
Undefined array key 0 at /var/www/vendor/tcg/voyager/src/Database/Schema/SchemaManager.php:76
Expected behavior
be certain to have $index[0] or a check to its existance
Screenshots
No response
Additional context
you should use array_values or check if !empty($indexes[0]['type']))
The text was updated successfully, but these errors were encountered: