[pLog-svn] Lifetype 1.2.8 ...

Reto Hugi plog at hugi.to
Mon May 5 13:04:51 EDT 2008


On 05/05/2008 05:52 PM, Jon Daley wrote:
> So, is it true that Request::getValue shouldn't ever be called, and should 
> always be called with getFilteredValue instead?
> 
> That function is used 434 times.
> 

well, basically yes. we should never access request::* without some
filter. but that's just because it helps ommit outputting raw request
data back to the browser.

This one vor example (summaryaction.class.php) is not harmful as long as
Locales::isValidLocale() works as expected - but it would be better to
validate it before passing it to Locales::isValidLocale():

function &_loadLocale()
{
  $requestLocale = $this->_request->getValue( "lang" );
  $localeCode = "";
  $serverVars = HttpVars::getServer();

  if( $requestLocale ) {
    // check if it's a valid one
    if( Locales::isValidLocale( $requestLocale )) {
      $localeCode = $requestLocale;
    }
 }
...



More information about the pLog-svn mailing list