Skip to content

fix: usage on laravel routes#42

Merged
rivanuff merged 2 commits into
mainfrom
fix/custom-route-error
Jun 3, 2026
Merged

fix: usage on laravel routes#42
rivanuff merged 2 commits into
mainfrom
fix/custom-route-error

Conversation

@rivanuff

@rivanuff rivanuff commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Argument #3 ($id) must be of type ?int, false given

Copilot AI review requested due to automatic review settings June 3, 2026 12:45
@rivanuff rivanuff requested a review from a team as a code owner June 3, 2026 12:45
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

Coverage report for commit: 9c38a85
File: coverage.xml

Cover ┌─────────────────────────┐ Freq.
   0% │ ███████████████████████ │ 100.0%
  10% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  20% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  30% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  40% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  50% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  60% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  70% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  80% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  90% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
 100% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
      └─────────────────────────┘
 *Legend:* █ = Current Distribution 
Summary - Lines: - | Methods: -
FilesLinesMethodsBranches
src/Components
   Accordion.php--100.00%
   BackButton.php--100.00%
   Breadcrumb.php--100.00%
   Dialog.php--100.00%
   FeedbackForm.php--100.00%
   ImgFocalPoint.php--100.00%
   Nav.php--100.00%
   PatternContent.php--100.00%
   ReadSpeaker.php--100.00%
   SocialIcon.php--100.00%
   Tooltip.php--100.00%
src/Components/Breadcrumb
   Crumb.php--100.00%
src/Components/Traits
   ParentPage.php--100.00%
src
   ComponentsServiceProvider.php--100.00%
src/Hooks
   PatternContent.php--100.00%
   ReadSpeaker.php--100.00%

🤖 comment via lucassabreu/comment-coverage-clover

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a strict typing error in the breadcrumb builder by preventing a false post ID from being passed into Crumb::add() when the breadcrumb component is rendered outside a normal WordPress post context (e.g., on Laravel-driven routes).

Changes:

  • Guarded the final breadcrumb “current item” addition so get_the_ID() must return an int (not false) before passing it to add().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rivanuff rivanuff merged commit 5c2bd66 into main Jun 3, 2026
@rivanuff rivanuff deleted the fix/custom-route-error branch June 3, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants