[wp-trac] [WordPress Trac] #53278: [PHP 8] RSS Widget has infinite loop for instances with an undefined URL.

WordPress Trac noreply at wordpress.org
Tue Jun 8 18:31:00 UTC 2021


#53278: [PHP 8] RSS Widget has infinite loop for instances with an undefined URL.
-------------------------------------------------+-------------------------
 Reporter:  peterwilsoncc                        |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  5.8
Component:  Widgets                              |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  php8 has-patch has-unit-tests has-   |     Focuses:
  testing-info                                   |
-------------------------------------------------+-------------------------
Changes (by hellofromTonya):

 * keywords:  php8 has-patch has-unit-tests => php8 has-patch has-unit-tests
     has-testing-info


Comment:

 == Testing Instructions

 === Set up the test environment:

 - Change to PHP 8.0.x => In `.env` file, change `LOCAL_PHP=latest` to
 `LOCAL_PHP=8.0-fpm`.
 - Start up the WordPress Docker environment:
 {{{
 npm install
 npm run build
 npm run env:start
 npm run env:install
 }}}
 - Set a 6 second timeout limit => In `wp-config.php` add `set_time_limit(
 6 );` before `/* That's all, stop editing! Happy publishing. */`
 - Log into admin area
 - Go to Plugins > Add New
 - Add and activate Classic Widgets plugin
 - Go to Appearance > Widgets
 - Add the RSS widget to the footer

 === Test before applying fix

 - View the frontend home/root page
 - After 6 seconds, the page should render. Scroll down to the footer
 section.
 - Notice the fatal error
 {{{
 Fatal error: Maximum execution time of 6 seconds exceeded in /[path to the
 project]/wp-includes/widgets/class-wp-widget-rss.php on line 53
 }}}

 === Test after applying the fix

 - Repeat above steps
 - After rendering, notice there is no fatal error

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53278#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list