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

Code tags added.

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)

Closed as duplicate