ZF-12040: Syntax error in Controller file after creating an Action
Description
This file before creating an action
class IndexController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
// action body
if(2==1){
echo 'hi';
}
}
}
After creating an action named test this will become.
class IndexController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
// action body
if(2==1){
echo 'hi';
}
public function testAction()
{
// action body
}
}
Braces automatically stripped for all action ends with a if block brace, and it becomes a syntax error.
My platform PHP 5.2, Windows 7, ZF 1.11.11
Comments
Posted by Frank Brückner (frosch) on 2012-02-03T12:50:55.000+0000
Code tags added.
Posted by Harald Kremsner (hkrems) on 2012-02-17T09:46:32.000+0000
looking at ZF-9501 and ZF-9018 it seems that this issue * is well known for almost 2 years * and probably will never be fixed in ZF 1.xx (n)
Posted by Adam Lundrigan (adamlundrigan) on 2012-02-22T23:36:17.000+0000
Closed as duplicate