Skip to content

Commit 1a7965b

Browse files
committed
PhpExtension: supports dynamic parameters
1 parent 7b71edb commit 1a7965b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Bootstrap/Extensions/PhpExtension.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace Nette\Bootstrap\Extensions;
1111

1212
use Nette;
13+
use Nette\Schema\Expect;
1314

1415

1516
/**
@@ -19,7 +20,7 @@ final class PhpExtension extends Nette\DI\CompilerExtension
1920
{
2021
public function getConfigSchema(): Nette\Schema\Schema
2122
{
22-
return Nette\Schema\Expect::arrayOf('scalar');
23+
return Expect::arrayOf(Expect::scalar()->dynamic());
2324
}
2425

2526

@@ -42,7 +43,7 @@ public function loadConfiguration()
4243
$this->initialization->addBody('date_default_timezone_set(?);', [$value]);
4344

4445
} elseif (function_exists('ini_set')) {
45-
$this->initialization->addBody('ini_set(?, ?);', [$name, $value === false ? '0' : (string) $value]);
46+
$this->initialization->addBody('ini_set(?, (string) (?));', [$name, $value]);
4647

4748
} elseif (ini_get($name) !== (string) $value) {
4849
throw new Nette\NotSupportedException('Required function ini_set() is disabled.');

0 commit comments

Comments
 (0)