Bug #51782 [Opn]: goto - regression
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
Type: Bug
Package: *General Issues
Operating System: all
PHP Version: 5.3.2
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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)