Issues

ZF-12040: Syntax error in Controller file after creating an Action

Issue Type: Bug Created: 2012-02-03T10:41:18.000+0000 Last Updated: 2012-02-22T23:36:17.000+0000 Status: Closed Fix version(s): Reporter: shamseer (shamseerss) Assignee: Adam Lundrigan (adamlundrigan) Tags: - Zend_Tool

Related issues: - ZF-9018

Attachments:

Description

This file before creating an action

<pre class="highlight">
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.

<pre class="highlight">
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

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts