From 24a7c9642638ba40a51edcd638f24ee678deac99 Mon Sep 17 00:00:00 2001 From: avel Date: Fri, 31 Oct 2003 19:33:34 +0000 Subject: [PATCH] Fix for E_ALL error that can appear with get_browser(): 'browscap ini directive not set'. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6074 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- plugins/bug_report/bug_report.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/plugins/bug_report/bug_report.php b/plugins/bug_report/bug_report.php index 2be94e77..ad8fb3bb 100644 --- a/plugins/bug_report/bug_report.php +++ b/plugins/bug_report/bug_report.php @@ -41,7 +41,10 @@ function Show_Array($array) { return $str; } -$browser = get_browser(); +$browscap = ini_get('browscap'); +if(!empty($browscap)) { + $browser = get_browser(); +} $body_top = "I subscribe to the squirrelmail-users mailing list.\n" . " [ ] True - No need to CC me when replying\n" . " [ ] False - Please CC me when replying\n" . @@ -57,10 +60,12 @@ $body_top = "I subscribe to the squirrelmail-users mailing list.\n" . "(Optional) I got really bored and here's a fix:\n\n\n" . "----------------------------------------------\n" . "\nMy browser information:\n" . - ' '.$_SERVER['HTTP_USER_AGENT'] . "\n" . - " get_browser() information (List)\n" . - Show_Array((array) $browser) . - "\nMy web server information:\n" . + ' '.$_SERVER['HTTP_USER_AGENT'] . "\n" ; + if(isset($browser)) { + $body_top .= " get_browser() information (List)\n" . + Show_Array((array) $browser); + } + $body_top .= "\nMy web server information:\n" . " PHP Version " . phpversion() . "\n" . " PHP Extensions (List)\n" . Show_Array(get_loaded_extensions()) . -- 2.25.1