We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flags
Unfortunately, there is no possibility to setup the flags config via environment variable:
dibi/src/Dibi/Bridges/Nette/DibiExtension22.php
Lines 50 to 57 in 9e71132
When I have a neon config like this:
extensions: dibi: Dibi\Bridges\Nette\DibiExtension22 dibi: host: Utils\Extras::getenv('DATABASE_HOST') port: Utils\Extras::getenv('DATABASE_PORT', 3306) username: Utils\Extras::getenv('DATABASE_USER') password: Utils\Extras::getenv('DATABASE_PASSWORD') database: Utils\Extras::getenv('DATABASE_NAME') charset: Utils\Extras::getenv('DATABASE_CHARSET', 'utf8') flags: Utils\Extras::getenv('DATABASE_FLAGS', 0) lazy: Utils\Extras::getenv('DATABASE_LAZY', true)
The marked code tried to interpret the Nette\DI\Definitions\Statement as an array and it leads to wrong code.
Nette\DI\Definitions\Statement
The text was updated successfully, but these errors were encountered:
Probably the right solution can be:
if (isset($config['flags']) && (is_array($config['flags']) || is_scalar($config['flags']))) { $flags = 0; foreach ((array) $config['flags'] as $flag) { $flags |= constant($flag); } $config['flags'] = $flags; }
or similar one:
if (isset($config['flags']) && !is_object($config['flags']) { $flags = 0; foreach ((array) $config['flags'] as $flag) { $flags |= constant($flag); } $config['flags'] = $flags; }
Sorry, something went wrong.
I tried to add the successor, DibiExtension3, can you try it?
No branches or pull requests
Unfortunately, there is no possibility to setup the
flags
config via environment variable:dibi/src/Dibi/Bridges/Nette/DibiExtension22.php
Lines 50 to 57 in 9e71132
When I have a neon config like this:
The marked code tried to interpret the
Nette\DI\Definitions\Statement
as an array and it leads to wrong code.The text was updated successfully, but these errors were encountered: