View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006850 | mantisbt | localization | public | 2006-03-15 10:59 | 2007-10-04 01:40 |
Reporter | jiangxin | Assigned To | giallu | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Fixed in Version | 1.1.0rc1 | ||||
Summary | 0006850: obsolete MANTIS_ERROR | ||||
Description | $MANTIS_ERROR isn't global variable any more. These code are obsolete. diff --exclude=CVS -u -r mantis-sf-mirror/core/print_api.php mantis/core/print_api.php this function should rarely (if ever) be reached. instead the db_()
| ||||
Tags | No tags attached. | ||||
Attached Files | mantis-print_error.diff (794 bytes)
Index: core/print_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/print_api.php,v retrieving revision 1.174 diff -u -p -d -r1.174 print_api.php --- core/print_api.php 29 Jul 2007 17:32:14 -0000 1.174 +++ core/print_api.php 4 Aug 2007 06:59:28 -0000 @@ -1524,9 +1524,9 @@ # this function should rarely (if ever) be reached. instead the db_() # functions should trap (although inelegantly). function print_sql_error( $p_query ) { - global $MANTIS_ERROR, $g_administrator_email; + global $g_administrator_email; - PRINT $MANTIS_ERROR[ERROR_SQL]; + PRINT error_string( ERROR_SQL ); print_email_link( $g_administrator_email, lang_get( 'administrator' ) ); PRINT "<br />$p_query;<br />"; } | ||||
If this issue still exists, then we need to fix it. |
|
Yes, the function error_string() is defined in core/error_api.php and should be used instead of the direct access to MANTIS_ERROR. |
|
Since part of the problems (including the change in manage_user_prune.php) are already been solved by other patches I uploaded an updated patch file for this issue. It just replaces the MANTIS_ERROR access by an call to error_string(). |
|
Fixed. thanks for the patch |
|
MantisBT: master 656e7818 2007-08-04 05:05 Details Diff |
Fix 6850: obsolete MANTIS_ERROR usage git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@4529 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9 |
Affected Issues 0006850 |
|
mod - core/print_api.php | Diff File |