Hi to all, the show_error function I’ve found in Exceptions.php CI’s class is the following:
/**
* General Error Page
*
* This function takes an error message as input
* (either as a string or an array) and displays
* it using the specified template.
*
* @access private
* @param string the heading
* @param string the message
* @param string the template name
* @return string
*/
function show_error($heading, $message, $template = 'error_general')
{
$message = '<p>'.implode('</p><p>', ( ! is_array($message)) ? array($message) : $message).'</p>';
if (ob_get_level() > 1)
{
ob_end_flush();
}
ob_start();
include(APPPATH.'errors/'.$template.EXT);
$buffer = ob_get_contents();
ob_end_clean();
return $buffer;
}
Seems it takes as mandatory title the first argument, and mandatory message the second argument.
But when I call it, it does take only 1 argument, as message. So $heading argument seems fixed at “An error occured”, not customizable. It shouldn’t looking at the function declaration.
So what’s stealing the $heading value from calls?
