WordPress.org

Make WordPress Core

Opened 3 months ago

Last modified 2 months ago

#45513 reviewing defect (bug)

Notice: Undefined index: year

Reported by: 1naveengiri Owned by: SergeyBiryukov
Milestone: Future Release Priority: normal
Severity: normal Version: 5.0
Component: Permalinks Keywords: has-screenshots needs-testing dev-feedback has-patch needs-unit-tests
Focuses: Cc:

Description

With permalink structure /%postname%/%monthnum%/

When I visit a post in frontend it throw me a notice

Notice: Undefined index: year at wp-includes/rewrite.php:387

Attachments (3)

Screenshot 2018-12-07 at 10.00.46 AM.png (448.6 KB) - added by 1naveengiri 3 months ago.
error.png (141.1 KB) - added by mukesh27 3 months ago.
Error when we check frontend.
45513.patch (849 bytes) - added by mukesh27 3 months ago.
Please try this patch it working fine for me.

Download all attachments as: .zip

Change History (7)

#1 @mukesh27
3 months ago

  • Keywords has-screenshots needs-testing dev-feedback added

Nice cache @1naveengiri

Confirm if we use /%postname%/%monthnum%/ in Custom Structure then in front end it show attached Notice: Undefined index: year in /mukesh/wordpress5.0/wp-includes/rewrite.php on line 387

Last edited 3 months ago by mukesh27 (previous) (diff)

@mukesh27
3 months ago

Error when we check frontend.

@mukesh27
3 months ago

Please try this patch it working fine for me.

#2 @mukesh27
3 months ago

  • Keywords has-patch added; needs-patch removed

#3 @SergeyBiryukov
3 months ago

  • Milestone changed from Awaiting Review to 5.1
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#4 @pento
2 months ago

  • Keywords needs-unit-tests added
  • Milestone changed from 5.1 to Future Release

This will need fairly careful testing and review for back compat issues.

Unit tests would be useful here.

Note: See TracTickets for help on using tickets.