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

global variable issue #39

Closed
Draeli opened this issue Sep 7, 2014 · 1 comment
Closed

global variable issue #39

Draeli opened this issue Sep 7, 2014 · 1 comment

Comments

@Draeli
Copy link
Contributor

Draeli commented Sep 7, 2014

Working around Ekino/Sf2, I saw a problem in some case with plugin.
For example, in my case, I use "qTranslate Plus" (a plugin to offer multilanguage post), inside author use variable $request, that's means when I run a page using this plugin I haved a "bad argument" for "$kernel->terminate($request, $response);".
To avoid this, I suggest to say in documentation to wrap all (excluse use of course) content of app.php and app_dev.php in a function (not closure because I saw problem with that).
I my case I do :

<?php
use Symfony\Component\HttpFoundation\Request;

function run(){
// here all the stuff
}
run();

after this, no more problem :)

@rande
Copy link
Contributor

rande commented Sep 7, 2014

Can you create a PR to update the documentation ?

Draeli added a commit to Draeli/EkinoWordpressBundle that referenced this issue Sep 7, 2014
rande added a commit that referenced this issue Sep 7, 2014
#39 issue : documentation : avoid problem with some Wordpress plugin
@Draeli Draeli closed this as completed Sep 25, 2014
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

2 participants