| @@ -450,10 +450,11 @@ | ||
| 450 | 450 | $filecount = iterator_count( $fi ); |
| 451 | 451 | if( ! $filecount ) return; |
| 452 | 452 | |
| 453 | 453 | // Dynamic limit based on online members (scales with forum activity) |
| 454 | - $stats = WPF()->statistic(); | |
| 455 | - $online = max( 2, intval( $stats['online_members_count'] ) ); | |
| 454 | + // Use direct call to avoid recursion: statistic() calls post->get_url() which triggers cache->create() -> check() -> statistic() | |
| 455 | + $online = WPF()->member ? intval( WPF()->member->online_members_count() ) : 0; | |
| 456 | + $online = max( 2, $online ); | |
| 456 | 457 | $max = $online * 500; |
| 457 | 458 | $max = max( 1000, min( $max, 50000 ) ); |
| 458 | 459 | |
| 459 | 460 | /** |