[GH-ISSUE #1663] 🐛 [Bug] confi_gen.php cannot consume a value containing spaces #692

Closed
opened 2026-02-25 21:35:41 +03:00 by kerem · 4 comments
Owner

Originally created by @jeremiah on GitHub (Sep 8, 2025).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/1663

Originally assigned to: @IrAlfred on GitHub.

🐛 Bug

While running php config_gen.php I get this error;

PHP Fatal error:  Uncaught Symfony\Component\Dotenv\Exception\FormatException: A value containing spaces must be surrounded by quotes in "/usr/local/share/cypht/cypht-master/.env" at line 42.
..._EMAIL_SINCE=-1 week\nDEFAULT_SETTING_ALL...
                      ^ line 42 offset 840 in /usr/local/share/cypht/cypht-master/vendor/symfony/dotenv/Dotenv.php:546
Stack trace:
#0 /usr/local/share/cypht/cypht-master/vendor/symfony/dotenv/Dotenv.php(372): Symfony\Component\Dotenv\Dotenv->createFormatException()
#1 /usr/local/share/cypht/cypht-master/vendor/symfony/dotenv/Dotenv.php(249): Symfony\Component\Dotenv\Dotenv->lexValue()
#2 /usr/local/share/cypht/cypht-master/vendor/symfony/dotenv/Dotenv.php(562): Symfony\Component\Dotenv\Dotenv->parse()
#3 /usr/local/share/cypht/cypht-master/vendor/symfony/dotenv/Dotenv.php(83): Symfony\Component\Dotenv\Dotenv->doLoad()
#4 /usr/local/share/cypht/cypht-master/lib/environment.php(32): Symfony\Component\Dotenv\Dotenv->load()
#5 /usr/local/share/cypht/cypht-master/scripts/config_gen.php(25): Hm_Environment->load()
#6 {main}
  thrown in /usr/local/share/cypht/cypht-master/vendor/symfony/dotenv/Dotenv.php on line 546
### Version & Environment

Rev: [cypht-master]

OS: [Debian 13]

Originally created by @jeremiah on GitHub (Sep 8, 2025). Original GitHub issue: https://github.com/cypht-org/cypht/issues/1663 Originally assigned to: @IrAlfred on GitHub. ## 🐛 Bug While running `php config_gen.php` I get this error; ``` PHP Fatal error: Uncaught Symfony\Component\Dotenv\Exception\FormatException: A value containing spaces must be surrounded by quotes in "/usr/local/share/cypht/cypht-master/.env" at line 42. ..._EMAIL_SINCE=-1 week\nDEFAULT_SETTING_ALL... ^ line 42 offset 840 in /usr/local/share/cypht/cypht-master/vendor/symfony/dotenv/Dotenv.php:546 Stack trace: #0 /usr/local/share/cypht/cypht-master/vendor/symfony/dotenv/Dotenv.php(372): Symfony\Component\Dotenv\Dotenv->createFormatException() #1 /usr/local/share/cypht/cypht-master/vendor/symfony/dotenv/Dotenv.php(249): Symfony\Component\Dotenv\Dotenv->lexValue() #2 /usr/local/share/cypht/cypht-master/vendor/symfony/dotenv/Dotenv.php(562): Symfony\Component\Dotenv\Dotenv->parse() #3 /usr/local/share/cypht/cypht-master/vendor/symfony/dotenv/Dotenv.php(83): Symfony\Component\Dotenv\Dotenv->doLoad() #4 /usr/local/share/cypht/cypht-master/lib/environment.php(32): Symfony\Component\Dotenv\Dotenv->load() #5 /usr/local/share/cypht/cypht-master/scripts/config_gen.php(25): Hm_Environment->load() #6 {main} thrown in /usr/local/share/cypht/cypht-master/vendor/symfony/dotenv/Dotenv.php on line 546 ### Version & Environment ``` <!-- Paste Git-Commit ID or Tag-Name here --> Rev: [cypht-master] <!-- Specify your OS and OS Version here if the issue is (most likely) platform dependent. --> OS: [Debian 13]
kerem 2026-02-25 21:35:41 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@jeremiah commented on GitHub (Sep 8, 2025):

Changing the .env file strings that contained spaces to not containing spaces seems to have worked;

DEFAULT_SETTING_ALL_EMAIL_SINCE=-1 week

changed to

DEFAULT_SETTING_ALL_EMAIL_SINCE=-1

<!-- gh-comment-id:3266024903 --> @jeremiah commented on GitHub (Sep 8, 2025): Changing the .env file strings that contained spaces to not containing spaces seems to have worked; `DEFAULT_SETTING_ALL_EMAIL_SINCE=-1 week` changed to `DEFAULT_SETTING_ALL_EMAIL_SINCE=-1`
Author
Owner

@IrAlfred commented on GitHub (Sep 10, 2025):

Hello @jeremiah,

Thank you for taking time to report this issue and for your interest in Cypht.

You are absolutely correct in your diagnosis. The error occurs because the Symfony Dotenv parser, which reads the .env file, requires that any value containing spaces must be wrapped in quotes.

So the line

DEFAULT_SETTING_ALL_EMAIL_SINCE=-1 week

should be changed to

DEFAULT_SETTING_ALL_EMAIL_SINCE='-1 week'

It's fine with single or double quote.

Thanks again for using Cypht!

<!-- gh-comment-id:3274831315 --> @IrAlfred commented on GitHub (Sep 10, 2025): Hello @jeremiah, Thank you for taking time to report this issue and for your interest in Cypht. You are absolutely correct in your diagnosis. The error occurs because the Symfony Dotenv parser, which reads the .env file, requires that any value containing spaces must be wrapped in quotes. So the line ``` DEFAULT_SETTING_ALL_EMAIL_SINCE=-1 week ``` should be changed to ``` DEFAULT_SETTING_ALL_EMAIL_SINCE='-1 week' ``` It's fine with single or double quote. Thanks again for using Cypht!
Author
Owner

@jeremiah commented on GitHub (Sep 10, 2025):

Thanks for the reply. I'll change the string to include single quotes, test, and report back results.

<!-- gh-comment-id:3275166314 --> @jeremiah commented on GitHub (Sep 10, 2025): Thanks for the reply. I'll change the string to include single quotes, test, and report back results.
Author
Owner

@jeremiah commented on GitHub (Sep 10, 2025):

After making the change, I ran the config_gen.php successfully.

<!-- gh-comment-id:3275187859 --> @jeremiah commented on GitHub (Sep 10, 2025): After making the change, I ran the config_gen.php successfully.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#692
No description provided.