| Anonymous | Login | Signup for a new account | 2013-05-18 20:22 EDT | ![]() |
| Main | My View | View Issues | Change Log | Roadmap | Wiki | ManTweet | Repositories |
| View Issue Details [ Jump to Notes ] [ Wiki ] [ Related Changesets ] | [ Issue History ] [ Print ] | ||||||||
| 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 | ||||||
| Platform | OS | OS Version | |||||||
| 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 ) { } # don't send the page header information if it has already been sent if( $g_error_send_page_header || $g_error_send_page_header == null ) { if( $t_html_api ) { html_page_top1(); if( $p_error != ERROR_DB_QUERY_FAILED && $t_db_connected == true ) { 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. | ||||||||
| Attached Files | |||||||||
Notes |
|
|
dhx (developer) 2010-08-12 09:10 |
Thanks Mark, I've committed a fix ready for the next release. |
Related Changesets |
|||
|
MantisBT: master e71dfde5
Timestamp: 2010-08-12 13:03:54 Author: dhx [ 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). |
||
| mod - core/error_api.php | [ Diff ] [ File ] | ||
|
MantisBT: master-1.2.x afd5c450
Timestamp: 2010-08-12 13:03:54 Author: dhx [ 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). |
||
| mod - core/error_api.php | [ Diff ] [ File ] | ||
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2010-08-11 14:38 | mark_k2 | New Issue | |
| 2010-08-12 09:03 | dhx | Assigned To | => dhx |
| 2010-08-12 09:03 | dhx | Status | new => assigned |
| 2010-08-12 09:03 | dhx | Target Version | => 1.2.3 |
| 2010-08-12 09:09 | dhx | Changeset attached | => MantisBT master e71dfde5 |
| 2010-08-12 09:09 | dhx | Changeset attached | => MantisBT master-1.2.x afd5c450 |
| 2010-08-12 09:09 | dhx | Resolution | open => fixed |
| 2010-08-12 09:09 | dhx | Fixed in Version | => 1.2.3 |
| 2010-08-12 09:10 | dhx | Note Added: 0026295 | |
| 2010-08-12 09:10 | dhx | Status | assigned => resolved |
| 2011-08-02 12:35 | dregad | Status | resolved => closed |
| MantisBT 1.2.16dev master-1.2.x-8c2bd07 [^]
Copyright © 2000 - 2013 MantisBT Team
Time: 0.0806 seconds. memory usage: 2,791 KB |