darsain / laravel-console

In-browser console for Laravel PHP framework.
170 stars 44 forks source link

Error when executing code #28

Closed arne-s closed 10 years ago

arne-s commented 10 years ago

When I click execute after entering code, I get this error:

{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"syntax error, unexpected '\"', expecting T_STRING","file":"\/Users\/user\/www\/project\/vendor\/darsain\/laravel-console\/src\/Darsain\/Console\/Console.php(111) : eval()'d code","line":1}}

After adding stripslashes() to the $code var method before eval(), the error goes away

I'm running Laravel on MacOS Mavericks, PHP 5.3 on MAMP

darsain commented 10 years ago

Do you have magic_quotes turned off?

arne-s commented 10 years ago

Yep, that was the problem. :)

darsain commented 10 years ago

K.