Bug #52107 [Opn->Fbk]: Eval does not recognize local scope variables

From: Date: Tue, 15 Nov 2011 15:51:15 +0000
Subject: Bug #52107 [Opn->Fbk]: Eval does not recognize local scope variables
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-165168@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=52107&edit=1 ID: 52107 Updated by: felipe@php.net Reported by: nick dot mitin at gmail dot com Summary: Eval does not recognize local scope variables -Status: Open +Status: Feedback Type: Bug Package: Scripting Engine problem Operating System: Ubuntu 10.04 32bit PHP Version: 5.3.2 Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: ------------------------------------------------------------------------ [2010-06-17 08:26:33] nick dot mitin at gmail dot com Description: ------------ Sometimes under undetermined conditions eval() does not see the local scope function variables. $returnTo = $_SERVER['REQUEST_URI']; eval('$this->content = "' . $this->application->getTemplate('/admin/user/login/login') . '";'); Assuming that I have $returnTo variable inside a '/admin/user/login/login', I see the "Notice: undefined variable $returnTo", while evaling it. But, If I create a dummy function moo() and eval somthing there the notice is gone. See whole listing for details. Test script: --------------- Whole listing: http://kinokapsula.artgorbunov.ru/bug.php ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=52107&edit=1

« previous php.bugs (#165168) next »