Skip to content
New issue

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

ContainerLoader - implode(): Invalid arguments passed #119

Closed
f3l1x opened this issue Jun 29, 2016 · 1 comment
Closed

ContainerLoader - implode(): Invalid arguments passed #119

f3l1x opened this issue Jun 29, 2016 · 1 comment

Comments

@f3l1x
Copy link
Member

@f3l1x f3l1x commented Jun 29, 2016

PHP: 7.0
nette/di: 2.4.0


This snippet of code triggered error.

    $loader = new ContainerLoader(TEMP_DIR, TRUE);
    $class = $loader->load(function (Compiler $compiler) {
        $compiler->addExtension('a', new FoobarExtension);
    }, 'foobar');
   Exited with error code 255 (expected 0)
   E_WARNING: implode(): Invalid arguments passed

   in src/DI/ContainerLoader.php(119) 
   in src/DI/ContainerLoader.php(119) implode()
   in src/DI/ContainerLoader.php(82) Nette\DI\ContainerLoader->generate()
   in src/DI/ContainerLoader.php(47) Nette\DI\ContainerLoader->loadFile()

I think that problem might be here (double implode).

https://github.com/nette/di/blob/v2.4.0/src/DI/Compiler.php#L161
https://github.com/nette/di/blob/v2.4.0/src/DI/ContainerLoader.php#L119


Is it wrong usage or it is really bug? :-)

@dg dg closed this in 0ed70b3 Jun 29, 2016
@f3l1x

This comment has been minimized.

Copy link
Member Author

@f3l1x f3l1x commented Jun 29, 2016

Thanks David :) @dg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.