raistie
2 months ago
131
4
General

getTableColumns suddenly auto-sorted?

Posted 2 months ago by raistie

Hi, I am having a problem that suddenly appeared. When I do a gettablecolumns through

$this->getConnection()->getSchemaBuilder()->getColumnListing($this->getTable());

Previously that correctly returned the array of column names as per the column order, e.g.

array:92 [ 0 => "id" 1 => "name" 2 => "desc" 3 => "token" 4 => "user_id" 5 => "portal" 6 => "uid" 7 => "created_by" 8 => "created_at" 9 => "updated_at"

Suddenly it starts to return the array in Alphabetical order e.g.

array:92 [ 0 => "ach" 1 => "AESSCORE" 2 => "AGRSCORE" 3 => "ALTSCORE" 4 => "ANXSCORE" 5 => "authority" 6 => "ben" 7 => "car" 8 => "Careful" 9 => "caring" 10 => "change"

I can't for the life of me figure out why it would auto sort the array values, as I have not upgraded Laravel?

Does anyone know what is going on? Could it be due to the php installation?

Please sign in or create an account to participate in this conversation.