René's URL Explorer Experiment


Title: Fix TypeError on EXPLAIN FOR CONNECTION without integer ID by des1roer · Pull Request #689 · phpmyadmin/sql-parser · GitHub

Open Graph Title: Fix TypeError on EXPLAIN FOR CONNECTION without integer ID by des1roer · Pull Request #689 · phpmyadmin/sql-parser

X Title: Fix TypeError on EXPLAIN FOR CONNECTION without integer ID by des1roer · Pull Request #689 · phpmyadmin/sql-parser

Description: ExplainStatement::parse() assigns the token following FOR CONNECTION straight into public int|null $connectionId. Any token that is not an integer throws an uncaught TypeError from new Parser(...): Query Before After EXPLAIN FOR CONNECTION 458 connectionId = 458 connectionId = 458 EXPLAIN FOR CONNECTION TypeError: Cannot assign string ... parser error Unexpected token. EXPLAIN FOR CONNECTION abc TypeError: Cannot assign string ... parser error Unexpected token. EXPLAIN FOR CONNECTION 1.5 TypeError: Cannot assign float ... parser error Unexpected token. This is the issue reported as CVE-2026-121262 (6.0.0, 6.0.1). Both static analysers already flagged it, but the findings had been added to the baselines. Changes: validate the token the same way KillStatement does (TokenType::Number + is_int), otherwise report Unexpected token.; add parser fixtures for the valid case (parseExplain15) and three invalid ones (parseExplainErr4–6); remove the connectionId / $nextToken->value entries from phpstan-baseline.neon and psalm-baseline.xml, which no longer match. Verified locally on PHP 8.5: phpunit passes (1030 tests), phpstan and psalm report nothing new. The remaining findings ($argv in tools/*Generator.php, the ContextGenerator psalm baseline entry, the OPTIONS constant type hint) were already there before this change. 🤖 Generated with Claude Code

Open Graph Description: ExplainStatement::parse() assigns the token following FOR CONNECTION straight into public int|null $connectionId. Any token that is not an integer throws an uncaught TypeError from new Parser(...):...

X Description: ExplainStatement::parse() assigns the token following FOR CONNECTION straight into public int|null $connectionId. Any token that is not an integer throws an uncaught TypeError from new Parser(...):...

Opengraph URL: https://github.com/phpmyadmin/sql-parser/pull/689

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.3

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:fa489a3a-ced5-d17c-b6b1-b9ff38d56dff
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA428:2815D1:94067D:C9F565:6B048165
html-safe-nonce11b3870f8fd59f6693ea8eeae29c0649f2cab42f29627ee5f89d06378232391b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDI4OjI4MTVEMTo5NDA2N0Q6QzlGNTY1OjZCMDQ4MTY1IiwidmlzaXRvcl9pZCI6IjY4NDQ4MzY0MzMwNzM4MzIyOTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac68cbcbfd4a05b04de04bbc2dfea458bd232c26803c7f5ca518da6bfb1b3d3b48
hovercard-subject-tagpull_request:5353344186
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/phpmyadmin/sql-parser/pull/689/files
twitter:imagehttps://avatars.githubusercontent.com/u/10970793?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/10970793?s=400&v=4
og:image:altExplainStatement::parse() assigns the token following FOR CONNECTION straight into public int|null $connectionId. Any token that is not an integer throws an uncaught TypeError from new Parser(...):...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None0366ddfb372682a32e92a5d86155cb08fa83e5bbe79953a968789f2f7e24c511
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/phpmyadmin/sql-parser git https://github.com/phpmyadmin/sql-parser.git
octolytics-dimension-user_id1351977
octolytics-dimension-user_loginphpmyadmin
octolytics-dimension-repository_id36256604
octolytics-dimension-repository_nwophpmyadmin/sql-parser
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id36256604
octolytics-dimension-repository_network_root_nwophpmyadmin/sql-parser
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseed3f2e01f6b7672780c586c8af0e72726374d7b6
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/phpmyadmin/sql-parser/pull/689/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpmyadmin%2Fsql-parser%2Fpull%2F689%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpmyadmin%2Fsql-parser%2Fpull%2F689%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=phpmyadmin%2Fsql-parser
Reloadhttps://github.com/phpmyadmin/sql-parser/pull/689/files
Reloadhttps://github.com/phpmyadmin/sql-parser/pull/689/files
Reloadhttps://github.com/phpmyadmin/sql-parser/pull/689/files
phpmyadminhttps://github.com/phpmyadmin
sql-parserhttps://github.com/phpmyadmin/sql-parser
Codehttps://github.com/phpmyadmin/sql-parser
Issues55 (55)https://github.com/phpmyadmin/sql-parser/issues
Pull requests21 (21)https://github.com/phpmyadmin/sql-parser/pulls
Actionshttps://github.com/phpmyadmin/sql-parser/actions
Security and qualityhttps://github.com/phpmyadmin/sql-parser/security
Insightshttps://github.com/phpmyadmin/sql-parser/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fphpmyadmin%2Fsql-parser%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fphpmyadmin%2Fsql-parser%2Fissues%2Fnew%2Fchoose
MauricioFauthhttps://github.com/MauricioFauth
phpmyadmin:6.0.xhttps://github.com/phpmyadmin/sql-parser/tree/6.0.x
des1roer:fix-explain-for-connection-type-errorhttps://github.com/des1roer/sql-parser/tree/fix-explain-for-connection-type-error
Conversation 3 https://github.com/phpmyadmin/sql-parser/pull/689
Commits 1 https://github.com/phpmyadmin/sql-parser/pull/689/commits
Checks 20 https://github.com/phpmyadmin/sql-parser/pull/689/checks
Files changed https://github.com/phpmyadmin/sql-parser/pull/689/files
Please reload this pagehttps://github.com/phpmyadmin/sql-parser/pull/689/files
Fix TypeError on EXPLAIN FOR CONNECTION without integer ID https://github.com/phpmyadmin/sql-parser/pull/689/files#top
Show all changes 1 commit https://github.com/phpmyadmin/sql-parser/pull/689/files
eab502d Fix TypeError on EXPLAIN FOR CONNECTION without integer ID des1roer Nov 17, 2026 https://github.com/phpmyadmin/sql-parser/pull/689/commits/eab502dcddbac97a5f1cdc3d23dfc7b7cc9c481c
Clear filters https://github.com/phpmyadmin/sql-parser/pull/689/files
Please reload this pagehttps://github.com/phpmyadmin/sql-parser/pull/689/files
Please reload this pagehttps://github.com/phpmyadmin/sql-parser/pull/689/files
phpstan-baseline.neon https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-995edee38ad4f8387e58ebd52c31bcc04c56cc2448d331b1cf5e0b35c57b9efa
psalm-baseline.xml https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-3208225af5a3ef0c924761633ad6b04cbfa5eab3d3bafcc49c79441e89257ee7
ExplainStatement.php https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-4c0efa2dcac508677b4a072ddcd2d4de8b3178c0ea3b3031b7d2425c9c9ec703
ExplainStatementTest.php https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-9f4cffb40496fa24a5577a7fb33eff1f4a1edc8c17d4cdb609eaae903dfd1a0a
parseExplain15.in https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-5333074b70b2f0993351e8b66c15cc12201e00223afd04e645461a5247283d0d
parseExplain15.out https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-e49df0f9b72c4792d4da4a7b89bbc7694fafb2953498745cc2a9c5c4fc64bf8d
parseExplainErr4.in https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-b64a05600e732276830815edc5bbdc451660757b11c8e8547540e8a836d082e4
parseExplainErr4.out https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-3ddd886680ef9a5d8fdbd344712658366fc2601c58d8cc4e6424f9a175c05578
parseExplainErr5.in https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-781a0b06b0ffac85de74f3ac0393160e753fe6c99954df7e5bda02efdfbf3357
parseExplainErr5.out https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-f58e15eb057618c5d5410745a32133e91d33ada1c2791d3502201eee7839cd34
parseExplainErr6.in https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-ec05f8f422ec1c05becb4c76e52241b93e4f3c39fadef59a25d89772fdbbfdc1
parseExplainErr6.out https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-d741e8f80f44405779b8fd3c1b2844c9792d64e38fbe329a08e36f0863be18a1
phpstan-baseline.neonhttps://github.com/phpmyadmin/sql-parser/pull/689/files#diff-995edee38ad4f8387e58ebd52c31bcc04c56cc2448d331b1cf5e0b35c57b9efa
View file https://github.com/des1roer/sql-parser/blob/eab502dcddbac97a5f1cdc3d23dfc7b7cc9c481c/phpstan-baseline.neon
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpmyadmin/sql-parser/pull/689/{{ revealButtonHref }}
https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-995edee38ad4f8387e58ebd52c31bcc04c56cc2448d331b1cf5e0b35c57b9efa
https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-995edee38ad4f8387e58ebd52c31bcc04c56cc2448d331b1cf5e0b35c57b9efa
https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-995edee38ad4f8387e58ebd52c31bcc04c56cc2448d331b1cf5e0b35c57b9efa
psalm-baseline.xmlhttps://github.com/phpmyadmin/sql-parser/pull/689/files#diff-3208225af5a3ef0c924761633ad6b04cbfa5eab3d3bafcc49c79441e89257ee7
View file https://github.com/des1roer/sql-parser/blob/eab502dcddbac97a5f1cdc3d23dfc7b7cc9c481c/psalm-baseline.xml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpmyadmin/sql-parser/pull/689/{{ revealButtonHref }}
https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-3208225af5a3ef0c924761633ad6b04cbfa5eab3d3bafcc49c79441e89257ee7
https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-3208225af5a3ef0c924761633ad6b04cbfa5eab3d3bafcc49c79441e89257ee7
src/Statements/ExplainStatement.phphttps://github.com/phpmyadmin/sql-parser/pull/689/files#diff-4c0efa2dcac508677b4a072ddcd2d4de8b3178c0ea3b3031b7d2425c9c9ec703
View file https://github.com/des1roer/sql-parser/blob/eab502dcddbac97a5f1cdc3d23dfc7b7cc9c481c/src/Statements/ExplainStatement.php
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpmyadmin/sql-parser/pull/689/{{ revealButtonHref }}
https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-4c0efa2dcac508677b4a072ddcd2d4de8b3178c0ea3b3031b7d2425c9c9ec703
https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-4c0efa2dcac508677b4a072ddcd2d4de8b3178c0ea3b3031b7d2425c9c9ec703
https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-4c0efa2dcac508677b4a072ddcd2d4de8b3178c0ea3b3031b7d2425c9c9ec703
https://github.com/phpmyadmin/sql-parser/actions/runs/44046271959/job/135076345073?pr=689
https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-4c0efa2dcac508677b4a072ddcd2d4de8b3178c0ea3b3031b7d2425c9c9ec703
https://github.com/phpmyadmin/sql-parser/actions/runs/44046271959/job/135076345073?pr=689
https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-4c0efa2dcac508677b4a072ddcd2d4de8b3178c0ea3b3031b7d2425c9c9ec703
https://github.com/phpmyadmin/sql-parser/actions/runs/44046271959/job/135076345073?pr=689
https://github.com/phpmyadmin/sql-parser/actions/runs/44046271959/job/135076345073?pr=689
https://github.com/phpmyadmin/sql-parser/actions/runs/44046271959/job/135076345073?pr=689
https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-4c0efa2dcac508677b4a072ddcd2d4de8b3178c0ea3b3031b7d2425c9c9ec703
https://github.com/phpmyadmin/sql-parser/actions/runs/44046271959/job/135076345073?pr=689
https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-4c0efa2dcac508677b4a072ddcd2d4de8b3178c0ea3b3031b7d2425c9c9ec703
https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-4c0efa2dcac508677b4a072ddcd2d4de8b3178c0ea3b3031b7d2425c9c9ec703
https://github.com/phpmyadmin/sql-parser/actions/runs/44046271959/job/135076345073?pr=689
https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-4c0efa2dcac508677b4a072ddcd2d4de8b3178c0ea3b3031b7d2425c9c9ec703
https://github.com/phpmyadmin/sql-parser/actions/runs/44046271959/job/135076345073?pr=689
https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-4c0efa2dcac508677b4a072ddcd2d4de8b3178c0ea3b3031b7d2425c9c9ec703
tests/Parser/ExplainStatementTest.phphttps://github.com/phpmyadmin/sql-parser/pull/689/files#diff-9f4cffb40496fa24a5577a7fb33eff1f4a1edc8c17d4cdb609eaae903dfd1a0a
View file https://github.com/des1roer/sql-parser/blob/eab502dcddbac97a5f1cdc3d23dfc7b7cc9c481c/tests/Parser/ExplainStatementTest.php
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpmyadmin/sql-parser/pull/689/{{ revealButtonHref }}
https://github.com/phpmyadmin/sql-parser/pull/689/files#diff-9f4cffb40496fa24a5577a7fb33eff1f4a1edc8c17d4cdb609eaae903dfd1a0a
tests/data/parser/parseExplain15.inhttps://github.com/phpmyadmin/sql-parser/pull/689/files#diff-5333074b70b2f0993351e8b66c15cc12201e00223afd04e645461a5247283d0d
View file https://github.com/des1roer/sql-parser/blob/eab502dcddbac97a5f1cdc3d23dfc7b7cc9c481c/tests/data/parser/parseExplain15.in
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpmyadmin/sql-parser/pull/689/{{ revealButtonHref }}
tests/data/parser/parseExplain15.outhttps://github.com/phpmyadmin/sql-parser/pull/689/files#diff-e49df0f9b72c4792d4da4a7b89bbc7694fafb2953498745cc2a9c5c4fc64bf8d
View file https://github.com/des1roer/sql-parser/blob/eab502dcddbac97a5f1cdc3d23dfc7b7cc9c481c/tests/data/parser/parseExplain15.out
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpmyadmin/sql-parser/pull/689/{{ revealButtonHref }}
tests/data/parser/parseExplainErr4.inhttps://github.com/phpmyadmin/sql-parser/pull/689/files#diff-b64a05600e732276830815edc5bbdc451660757b11c8e8547540e8a836d082e4
View file https://github.com/des1roer/sql-parser/blob/eab502dcddbac97a5f1cdc3d23dfc7b7cc9c481c/tests/data/parser/parseExplainErr4.in
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpmyadmin/sql-parser/pull/689/{{ revealButtonHref }}
tests/data/parser/parseExplainErr4.outhttps://github.com/phpmyadmin/sql-parser/pull/689/files#diff-3ddd886680ef9a5d8fdbd344712658366fc2601c58d8cc4e6424f9a175c05578
View file https://github.com/des1roer/sql-parser/blob/eab502dcddbac97a5f1cdc3d23dfc7b7cc9c481c/tests/data/parser/parseExplainErr4.out
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpmyadmin/sql-parser/pull/689/{{ revealButtonHref }}
tests/data/parser/parseExplainErr5.inhttps://github.com/phpmyadmin/sql-parser/pull/689/files#diff-781a0b06b0ffac85de74f3ac0393160e753fe6c99954df7e5bda02efdfbf3357
View file https://github.com/des1roer/sql-parser/blob/eab502dcddbac97a5f1cdc3d23dfc7b7cc9c481c/tests/data/parser/parseExplainErr5.in
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpmyadmin/sql-parser/pull/689/{{ revealButtonHref }}
Please reload this pagehttps://github.com/phpmyadmin/sql-parser/pull/689/files
Please reload this pagehttps://github.com/phpmyadmin/sql-parser/pull/689/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.