View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0012249 | mantisbt | html | public | 2010-08-11 14:38 | 2011-08-02 12:35 |
Reporter | mark_k2 | Assigned To | dhx | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | git trunk | ||||
Target Version | 1.2.3 | Fixed in Version | 1.2.3 | ||
Summary | 0012249: g_error_send_page_header condition check always evaluates to true | ||||
Description | In core/error_api.php around line 166 function error_handler( $p_type, $p_error, $p_file, $p_line, $p_context ) {
The condition check of $g_error_send_page_header always evaluates to true because any non 0, non negative number will trigger the first part of the if statement, and any 0, null, empty string, or negative number will trigger the second check. I think the second check should use three equal signs when checking against null. | ||||
Tags | No tags attached. | ||||
MantisBT: master e71dfde5 2010-08-12 09:03 Details Diff |
Fix 0012249: g_error_send_page_header condition check always true Within the error_handler() function of error_api.php, this check was being performed: if( $g_error_send_page_header || $g_error_send_page_header == null ) Due to PHP's handling of boolean logic this check would always be validated as true. To solve this problem we simplify the evaluation by removing the possibility that the variable can be null (we set it to true by default now). |
Affected Issues 0012249 |
|
mod - core/error_api.php | Diff File | ||
MantisBT: master-1.2.x afd5c450 2010-08-12 09:03 Details Diff |
Fix 0012249: g_error_send_page_header condition check always true Within the error_handler() function of error_api.php, this check was being performed: if( $g_error_send_page_header || $g_error_send_page_header == null ) Due to PHP's handling of boolean logic this check would always be validated as true. To solve this problem we simplify the evaluation by removing the possibility that the variable can be null (we set it to true by default now). |
Affected Issues 0012249 |
|
mod - core/error_api.php | Diff File |