On 5/25/10 4:36 PM, Lukas Kahwe Smith wrote:
Hi,
Not really sure whats going on, but for some reason sf 1.4 seems to load the
(error|exception).php.html even in debug mode. The method in question looks a
bit weird, especially the phpdoc comment for the $debug parameter seems to
indicate there was some refactoring that might have broke things. Anyway, it
seems to me like $templatePaths should leave out the first two entries if
sf_debug is true:
In debug mode (debug to true), symfony should load exception templates,
and error templates otherwise.
Fabien
/**
* Returns the path for the template error message.
*
* @param string $format The request format
* @param Boolean $debug Whether to return a template for the debug mode
or not
*
* @return string|Boolean false if the template cannot be found for the
given format,
* the absolute path to the template otherwise
*/
static public function getTemplatePathForError($format, $debug)
{
$templatePaths = array(
sfConfig::get('sf_app_config_dir').'/error',
sfConfig::get('sf_config_dir').'/error',
dirname(__FILE__).'/data',
);
$template = sprintf('%s.%s.php', $debug ? 'exception' : 'error', $format);
foreach ($templatePaths as $path)
{
if (null !== $path&& is_readable($file = $path.'/'.$template))
{
return $file;
}
}
return false;
}
regards,
Lukas Kahwe Smith
[email protected]
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en