#19349·phpmyadmin

ErrorException: Attempt to read property "keyword" on null

Author: liviuconcioiuCreated Nov 1, 2024Updated Sep 2, 2026
LabelsBugduplicatewaiting on upstream

Describe the bug

When a table name contains dots, columns can't be sorted. The bug is in sql-parser it seems.

On 5.2.2-dev it gives the HTML code in modal, but on 6.0.0-dev I get this:

Internal error in ./vendor/phpmyadmin/sql-parser/src/Utils/Query.php#413
ErrorException: Attempt to read property "keyword" on null

https://github.com/phpmyadmin/sql-parser/blob/5c4dc472f1fcbe6467bac080d0a3538b2700ee31/src/Utils/Query.php#L413

To Reproduce

Steps to reproduce the behavior:

  1. Create table
sql
CREATE TABLE `test.2024-11-01` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

INSERT INTO `test.2024-11-01` (`id`) VALUES
(1),
(2);
  1. Click on id
  2. See error

Expected behavior

There should be no error when sorting columns inside a table name that contains dots.

Screenshots

https://github.com/user-attachments/assets/623cbf70-f1f1-4c24-a0dc-6e2fbf01cfad

Server configuration

  • PHP version: 8.4.0RC3
  • phpMyAdmin version: 5.2.2-dev, 6.0.0-dev