Issues

ZF-9859: Redirector::gotoUrlAndExit() should call setGotoUrl() instead of gotoUrl()

Description

Two of the three gotoXXXAndExit() functions call the setGotoXXX() just as their gotoXXX() counterparts do, but the third one, gotoUrlAndExit(), calls its gotoUrl() counterpart instead. While the code works fine since gotoUrl() calls setGotoUrl() itself, and if the call to getExit() returns true, redirectAndExit() is called which gotoUrlAndExit() does itself anyway, it is clearly a copy-and-paste error and should be fixed for consistency.

Here's the normal pattern:


doAandMaybeB():
  doA()
  if shouldDoB():
    doB()

doAandB():
  doA()
  doB()

Here's the broken pattern that gotoUrlAndExit() uses:


doAandB():
  doAandMaybeB()  // <-- should be doA()
  doB()

I'm running 1.9.4 but checked the latest revision using the code browser:

<a rel="nofollow" href="http://framework.zend.com/code/browse/~raw,r=20096/Zend_Framework/standard/trunk/library/Zend/Controller/Action/Helper/Redirector.php">http://framework.zend.com/code/browse/&hellip;</a>

Comments

tested it and changed it in r22957