fix: address code review feedback (comment clarity, remove redundant static array, add CSS class)
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/86bb1e0e-2bbd-439b-88cd-7a624ad24761 Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
parent
5c463d381f
commit
d0c86926bd
3 changed files with 2 additions and 9 deletions
|
|
@ -63,14 +63,6 @@ if (!function_exists('gsp_collect_xml_error')) {
|
|||
$log_message = "[GSP] $title" . (empty($details) ? '' : ' Details: ' . $details);
|
||||
error_log($log_message);
|
||||
|
||||
static $errors = [];
|
||||
$errors[] = array(
|
||||
'file' => $file,
|
||||
'title' => $title,
|
||||
'details' => $details,
|
||||
);
|
||||
// Store in a predictable global so callers (e.g. home.php) can read it
|
||||
// even across include boundaries without having to call the function.
|
||||
$GLOBALS['_gsp_xml_errors'][] = array(
|
||||
'file' => $file,
|
||||
'title' => $title,
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ class rss_php {
|
|||
$rss = ltrim($rss);
|
||||
|
||||
// Reject obviously non-XML content early to avoid noisy libxml warnings.
|
||||
// Minimum well-formed XML is at least "<a/>" (4 bytes); require one more.
|
||||
if(strlen($rss) < 5 || $rss[0] !== '<') {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue