CakePHP requestAction and eval code

Posted by Naveed on Stack Overflow See other posts from Stack Overflow or by Naveed
Published on 2010-05-31T00:55:05Z Indexed on 2010/05/31 1:02 UTC
Read the original article Hit count: 248

Filed under:

Hi,

I am using cakephp for my site. I have stored multiple blocks in database and trying to access the code with following syntax.

foreach($blocks as $block){ if($block['Block']['position'] == 'left'){ $str = $block['Block']['value']; eval("\"echo $str\";"); } }

And i m getting this error; : Undefined property: View::$requestAction [APP\views\layouts\home.ctp(60) : eval()'d code

Your Help will be highly appreciated.

Thanks,

© Stack Overflow or respective owner

Related posts about cakephp-1.3