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

Argument 1 passed to Twig_Template::render() must be of the type array, object given #75

Open
laacz opened this issue Jul 15, 2013 · 3 comments

Comments

@laacz
Copy link

laacz commented Jul 15, 2013

I'm sorry to intrude like that, but would it be possible to merge no_static_view branch already? Just set up a new development workspace and got this error again. Twig from Extras is broken, when installing via Composer.

{
    "require": {
        "slim/slim": "2.*",
        "slim/extras": "2.*",
        "twig/twig": "1.*"
    }
}

Error message is self-explanatory:

Slim Application Error
The application could not run because of the following error:

Details

Type: ErrorException
Code: 4096
Message: Argument 1 passed to Twig_Template::render() must be of the type array, object given, called in /var/www/tld.in/vendor/slim/extras/Slim/Extras/Views/Twig.php on line 99 and defined
File: /var/www/tld.in/vendor/twig/twig/lib/Twig/Template.php
Line: 244
Trace

#0 /var/www/tld.in/vendor/twig/twig/lib/Twig/Template.php(244): Slim\Slim::handleErrors(4096, 'Argument 1 pass...', '/var/www/tld....', 244, Array)
#1 /var/www/tld.in/vendor/slim/extras/Slim/Extras/Views/Twig.php(99): Twig_Template->render(Object(Slim\Helper\Set))
#2 /var/www/tld.in/vendor/slim/slim/Slim/View.php(237): Slim\Extras\Views\Twig->render('index.twig')
#3 /var/www/tld.in/vendor/slim/slim/Slim/View.php(227): Slim\View->fetch('index.twig')
#4 /var/www/tld.in/vendor/slim/slim/Slim/Slim.php(734): Slim\View->display('index.twig')
#5 /var/www/tld.in/index.php(13): Slim\Slim->render('index.twig')
#6 [internal function]: {closure}()
#7 /var/www/tld.in/vendor/slim/slim/Slim/Route.php(436): call_user_func_array(Object(Closure), Array)
#8 /var/www/tld.in/vendor/slim/slim/Slim/Slim.php(1291): Slim\Route->dispatch()
#9 /var/www/tld.in/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call()
#10 /var/www/tld.in/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call()
#11 /var/www/tld.in/vendor/slim/slim/Slim/Middleware/PrettyExceptions.php(67): Slim\Middleware\MethodOverride->call()
#12 /var/www/tld.in/vendor/slim/slim/Slim/Slim.php(1240): Slim\Middleware\PrettyExceptions->call()
#13 /var/www/tld.in/index.php(16): Slim\Slim->run()
#14 {main}vvvvw```
@gilsonbguedes
Copy link

My application also had problem when I used the composer command update
having to use the versions below to have no problem.

"require": {
"php": "> = 5.3.0"
"slim / slim": "2",
"slim / extras": "2",
"twig / twig": "1. "
"illuminate / database": "
",
"dhorrigan / capsule": "*"
}

@silentworks
Copy link
Collaborator

Pleas use slim/views instead. Btw you no longer need dhorrigan/capsule to use DB schema outside of Laravel, that package has been included since 4.0.4 I think.

@gilsonbguedes
Copy link

You're right, no longer need the package dhorrigan/capsule Thank You.

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

3 participants