Advertisement:
Anonymous Login
04-24-2017 07:13 AM

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004832SMF 2.0Generalpublic2014-01-26 20:49
ReporterAngelinaBelle 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Summary0004832: Should not use $php_errormsg without checking error tracking first
DescriptionSee discussion and link to original post at http://www.simplemachines.org/community/index.php?topic=453830.0

In function template_include, if the template file cannot be found, and user is admin, eventually you get down to:

[code] require_once($sourcedir . '/Subs-Package.php');

            $error = fetch_web_data($boardurl . strtr($filename, array($boarddir => '', strtr($boarddir, '\\', '/') => '')));
            if (empty($error))
                $error = $php_errormsg;
[/code]
If fetch_web_data returns nothing, then $php_errormsg is used to come up with the error.
But if error tracking is not turned on, this will be undefined.



TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

bugnote:0014170

groundup (SMF Friend)

The easiest way to fix it is to change if (empty($error)) to if (empty($error) && !empty($php_errormsg))

Or we could check if $error was empty and then if $php_errormsg is empty we'd use a generic error message like "An error has occurred while attempting to fetch web data (be more descriptive) but error tracking appears to be disabled. Enable it to see what the message is"

bugnote:0014953

arrowtotheknee (SMF Friend)

Fixed in 2.1
+Notes
MantisBT (Modified for SMF Intergration)[^] Copyright © 2000 - 2010 Mantis Group