Bug #51782 [Opn->Bgs]: goto - regression

From: Date: Mon, 10 May 2010 10:00:16 +0000
Subject: Bug #51782 [Opn->Bgs]: goto - regression
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-150302@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=51782&edit=1

 ID:               51782
 Updated by:       johannes@php.net
 Reported by:      julian dot picht at gmail dot com
 Summary:          goto - regression
-Status:           Open
+Status:           Bogus
 Type:             Bug
 Package:          *General Issues
 Operating System: all
 PHP Version:      5.3.2

 New Comment:

.


Previous Comments:
------------------------------------------------------------------------
[2010-05-10 11:57:34] johannes@php.net

There is nothing broken as of 5.3.2, but 5.3.0, this addition was
discussed longtime ago. There was enough time to raise concerns this
won't be changed.

------------------------------------------------------------------------
[2010-05-10 11:27:16] julian dot picht at gmail dot com

Description:
------------
"goto" encourages bad coding style and breaks existing code. There needs
to be a 
php.ini-option to disable this "new feature".

Test script:
---------------
<?php

/* broken as of php 5.3.2 */

class Zend_Controller_Action_Helper_Redirector extends
Zend_Controller_Action_Helper_Abstract
{

[...]
    public function goto($action, $controller = null, $module = null,
array $params = array())
    {
        $this->setGoto($action, $controller, $module, $params);

        if ($this->getExit()) {
            $this->redirectAndExit();
        }
    }
[...]
}

Expected result:
----------------
should work as before 5.3.2

Actual result:
--------------
500 Internal Server Error in [...] Parse error: syntax error, unexpected
T_GOTO, 
expecting T_STRING in /var/www/de.tv-stars/ZendFramework-
1.5.1/library/Zend/Controller/Action/Helper/Redirector.php on line 383 


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51782&edit=1


Thread (5 messages)

« previous php.bugs (#150302) next »