Title: Unterminated double-quoted value at end of input is silently dropped · Issue #610 · phpdotenv/phpdotenv · GitHub
Open Graph Title: Unterminated double-quoted value at end of input is silently dropped · Issue #610 · phpdotenv/phpdotenv
X Title: Unterminated double-quoted value at end of input is silently dropped · Issue #610 · phpdotenv/phpdotenv
Description: When a double-quoted value is left unterminated at the end of the input, the whole entry and every line after it are dropped with no error. This is inconsistent with the single-quoted case, which reports a missing closing quote, so a str...
Open Graph Description: When a double-quoted value is left unterminated at the end of the input, the whole entry and every line after it are dropped with no error. This is inconsistent with the single-quoted case, which r...
X Description: When a double-quoted value is left unterminated at the end of the input, the whole entry and every line after it are dropped with no error. This is inconsistent with the single-quoted case, which r...
Opengraph URL: https://github.com/phpdotenv/phpdotenv/issues/610
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unterminated double-quoted value at end of input is silently dropped","articleBody":"When a double-quoted value is left unterminated at the end of the input, the whole entry and every line after it are dropped with no error. This is inconsistent with the single-quoted case, which reports a missing closing quote, so a stray quote can silently erase configuration rather than failing loudly.\n\n```php\nDotenv::parse('FOO=\"bar'); // returns [] — no exception\nDotenv::parse(\"A=\\\"oops\\nB=keep\"); // returns [] — B is swallowed too\nDotenv::parse(\"FOO='bar\"); // correctly throws \"a missing closing quote\"\n```\n\nThe cause is in `Lines::process()`: when the input ends while still inside a multiline value, the buffered content is discarded instead of being handed to the parser. Emitting the still-open buffer sends it to the transducer, which then reports the same \"missing closing quote\" error the single-quoted path already produces, and stops swallowing the following lines. A properly closed multiline value is unaffected.\n\nThis is a behaviour change rather than a pure bugfix, since input that currently returns an empty or partial array would start throwing. The current behaviour is silent data loss so the fix is well justified, but under SemVer it belongs in the next major rather than a 5.x release.\n","author":{"url":"https://github.com/GrahamCampbell","@type":"Person","name":"GrahamCampbell"},"datePublished":"2026-08-24T01:05:16Z","url":"https://github.com/phpdotenv/phpdotenv/issues/610"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e1c13f3d-b689-56ed-283c-c9e04c080622 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C4A8:74E58:857964:B2D6F5:6B063664 |
| html-safe-nonce | fc06f3fdd37abacbef6dd8bced4cbb036b2a5d6afde3d1b2657d27b6c7309e38 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNEE4Ojc0RTU4Ojg1Nzk2NDpCMkQ2RjU6NkIwNjM2NjQiLCJ2aXNpdG9yX2lkIjoiMzIxODcxODM1OTY1MDk3MzI4NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ce5895a8752d4cc070238eaa890fd2898b2e52d426fb3ed7520b5a4f4b5ec155 |
| hovercard-subject-tag | issue:5230067358 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/phpdotenv/phpdotenv/610/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5db4b318c2a980955e398c20af63efa3af04c6cb913650d0fc6c1bfc64e85ddd/phpdotenv/phpdotenv/issues/610 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5db4b318c2a980955e398c20af63efa3af04c6cb913650d0fc6c1bfc64e85ddd/phpdotenv/phpdotenv/issues/610 |
| og:image:alt | When a double-quoted value is left unterminated at the end of the input, the whole entry and every line after it are dropped with no error. This is inconsistent with the single-quoted case, which r... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | GrahamCampbell |
| hostname | github.com |
| expected-hostname | github.com |
| None | c3584c853cd39700ecff6e2cf8364295ffdb5313e571046c41cd2479270f7df0 |
| turbo-cache-control | no-preview |
| go-import | github.com/phpdotenv/phpdotenv git https://github.com/phpdotenv/phpdotenv.git |
| octolytics-dimension-user_id | 320763234 |
| octolytics-dimension-user_login | phpdotenv |
| octolytics-dimension-repository_id | 7769432 |
| octolytics-dimension-repository_nwo | phpdotenv/phpdotenv |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7769432 |
| octolytics-dimension-repository_network_root_nwo | phpdotenv/phpdotenv |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9eb3bb1597d09170a5f282cd38ae376dee1a5ec1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width