Bug #51782 [NEW]: goto - regression

From: Date: Mon, 10 May 2010 09:27:16 +0000
Subject: Bug #51782 [NEW]: goto - regression
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-150300@lists.php.net to get a copy of this message
From:             
Operating system: all
PHP version:      5.3.2
Package:          *General Issues
Bug Type:         Bug
Bug description:goto - regression

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 bug report at http://bugs.php.net/bug.php?id=51782&edit=1
-- 
Try a snapshot (PHP 5.2):            http://bugs.php.net/fix.php?id=51782&r=trysnapshot52
Try a snapshot (PHP 5.3):            http://bugs.php.net/fix.php?id=51782&r=trysnapshot53
Try a snapshot (PHP 6.0):            http://bugs.php.net/fix.php?id=51782&r=trysnapshot60
Fixed in SVN:                        http://bugs.php.net/fix.php?id=51782&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51782&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=51782&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=51782&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=51782&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=51782&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=51782&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=51782&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=51782&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=51782&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=51782&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51782&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51782&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=51782&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=51782&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=51782&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=51782&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=51782&r=mysqlcfg



Thread (5 messages)

« previous php.bugs (#150300) next »