Skip to content

Fix fatal ArgumentCountError in feedzy-schedules.php schedule counter#1212

Merged
vytisbulkevicius merged 2 commits intodevelopmentfrom
copilot/fix-sprintf-missing-argument
Apr 23, 2026
Merged

Fix fatal ArgumentCountError in feedzy-schedules.php schedule counter#1212
vytisbulkevicius merged 2 commits intodevelopmentfrom
copilot/fix-sprintf-missing-argument

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

sprintf() on line 86 of feedzy-schedules.php was receiving only the format string from _n() with no substitution value for the %d placeholder, causing a fatal ArgumentCountError that crashed the entire Schedules settings tab.

Changes

  • includes/layouts/feedzy-schedules.php: Pass $schedule_count as the second argument to sprintf() so the %d placeholder is substituted correctly
  • Fix translator comment from %s%d to match the actual format specifier
// Before (broken)
echo esc_html( sprintf( _n( '%d item', '%d items', $schedule_count, 'feedzy-rss-feeds' ) ) );

// After
echo esc_html( sprintf( _n( '%d item', '%d items', $schedule_count, 'feedzy-rss-feeds' ), $schedule_count ) );

…s.php

Agent-Logs-Url: https://github.com/Codeinwp/feedzy-rss-feeds/sessions/b563361c-63d3-47d7-8dbc-0df1ab4a2ded

Co-authored-by: rodica-andronache <3266155+rodica-andronache@users.noreply.github.com>
@rodica-andronache rodica-andronache marked this pull request as ready for review April 23, 2026 14:51
Copilot AI changed the title [WIP] Fix fatal error: sprintf() missing $schedule_count argument Fix fatal ArgumentCountError in feedzy-schedules.php schedule counter Apr 23, 2026
Copilot AI requested a review from rodica-andronache April 23, 2026 14:51
@pirate-bot
Copy link
Copy Markdown
Contributor

Plugin build for 0ec0e9d is ready 🛎️!

Note

You can preview the changes in the Playground

@vytisbulkevicius vytisbulkevicius merged commit 741c4c3 into development Apr 23, 2026
19 of 23 checks passed
@vytisbulkevicius vytisbulkevicius deleted the copilot/fix-sprintf-missing-argument branch April 23, 2026 15:27
@pirate-bot
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 5.1.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Indicate that an issue has been resolved and released in a particular version of the product.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fatal error: sprintf() missing $schedule_count argument in feedzy-schedules.php:86

4 participants