backtrace: check the parameter before use it
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3659 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -6,9 +6,12 @@ class backtrace
|
||||
{
|
||||
/** Display the backtrace in the browser
|
||||
* use: \backtrace::show (debug_backtrace ());
|
||||
* @param array $backtrace The backtrace to display
|
||||
*/
|
||||
public static function show ($backtrace)
|
||||
{
|
||||
if (! is_array ($backtrace))
|
||||
throw new \Exception ("Backtrace invalid: not an array", 500);
|
||||
echo "<pre>Debug BackTrace:\n";
|
||||
foreach ($backtrace as $key=>$back)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user