Fix possible fatal article number error in 1839remote_groupfile.

This commit is contained in:
Retro_Guy 2023-07-18 09:15:24 -07:00
parent f54bfb656a
commit 1b8f31fe34
1 changed files with 8 additions and 4 deletions

12
Rocksolid_Light/rslight/scripts/spoolnews.php Normal file → Executable file
View File

@ -140,6 +140,7 @@ function get_articles($ns, $group) {
$grouppath = $path.preg_replace('/\./', '/', $group);
$banned_names = file($user_ban_file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
$nocem_check="@@NCM";
@ -156,11 +157,14 @@ function get_articles($ns, $group) {
foreach($grouplist as $findgroup) {
$name = explode(':', $findgroup);
if (strcmp($name[0], $group) == 0) {
if (isset($name[1]))
if (is_numeric(trim($name[1]))) {
$article = $name[1] + 1;
break;
}
}
} else {
$article = 1;
}
break;
}
}
if(isset($CONFIG['enable_nntp']) && $CONFIG['enable_nntp'] == true) {
// Try to find last article number in local_groupfile