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

PHP Notice: Array to string conversion #19

Open
tivie opened this issue Aug 19, 2017 · 1 comment
Open

PHP Notice: Array to string conversion #19

tivie opened this issue Aug 19, 2017 · 1 comment

Comments

@tivie
Copy link

tivie commented Aug 19, 2017

Using latest PHPDocumentor and Twig (in PHP 7), a notice is raised:

PHP Notice:  Array to string conversion in \vendor\twig\twig\lib\Twig\Loader\Filesystem.php on line 34

Callstack:

Call Stack:
    0.0002     363344   1. {main}() vendor\evert\phpdoc-md\bin\phpdocmd:0
    0.0140     951672   2. PHPDocMD\Generator->run() \vendor\evert\phpdoc-md\bin\phpdocmd:79
    0.0152     999248   3. Twig_Loader_Filesystem->__construct() \vendor\evert\phpdoc-md\src\Generator.php:76

Checking twig's source code the second parameter is $rootpath but Generator.php is passing a "options array".

Related to #16

@tivie
Copy link
Author

tivie commented Aug 19, 2017

This can be fixed by removing the second parameter and moving it to Twig_Environment:

SOURCE

$loader = new Twig_Loader_Filesystem($this->templateDir);
$twig = new Twig_Environment($loader, [
    'cache' => false,
    'debug' => true,
]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant