Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions inc/Core/Steps/Fetch/Handlers/FetchHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ final public function get_fetch_data( int|string $pipeline_id, array $handler_co
// Items without dedup_key pass through unchanged.
$items = $this->dedup( $items, $context );

// Apply max_items cap when configured.
$max_items = (int) ( $config['max_items'] ?? 0 );
// Apply max_items cap.
// Default to 1 to prevent unbounded fan-out when flows lack an
// explicit max_items value. Set to 0 for unlimited.
$max_items = (int) ( $config['max_items'] ?? 1 );
if ( $max_items > 0 && count( $items ) > $max_items ) {
$items = array_slice( $items, 0, $max_items );
}
Expand Down
Loading