Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#53376 closed defect (bug) (duplicate)

Use of removed function set_magic_quotes_runtime on line 72 in file wp-content/plugins/rss-importer/rss-importer.php

Reported by: 0xcrypto's profile 0xcrypto Owned by:
Milestone: Priority: normal
Severity: blocker Version:
Component: Import Keywords:
Focuses: administration Cc:


In PHP 7+, the function set_magic_quotes_runtime has been removed. But the file wp-content/plugins/rss-importer/rss-importer.php:72 is still using it which blocks importing posts by throwing undefined function error while using the RSS import feature in

WordPress Version: 5.7.2
PHP Version: 8.0.7

[Thu Jun 10 09:13:21 2021] [::1]:36530 [200]: POST /wp-admin/admin.php?import=rss&step=1&_wpnonce=4b2d8cb818 - Uncaught Error: Call to undefined function set_magic_quotes_runtime() in /home/vi/Documents/wordpress/wp-content/plugins/rss-importer/rss-importer.php:72
Stack trace:
#0 /home/vi/Documents/wordpress/wp-content/plugins/rss-importer/rss-importer.php(178): RSS_Import->get_posts()
#1 /home/vi/Documents/wordpress/wp-content/plugins/rss-importer/rss-importer.php(204): RSS_Import->import()
#2 /home/vi/Documents/wordpress/wp-admin/admin.php(353): RSS_Import->dispatch()
#3 {main}
  thrown in /home/vi/Documents/wordpress/wp-content/plugins/rss-importer/rss-importer.php on line 72

I couldn't find the plugin in and the plugin is part of Import > Tool in WordPress so reporting here.

Change History (4)

#1 @0xcrypto
3 years ago

  • Keywords needs-patch added

Replacing set_magic_quotes_runtime(0); with the following fixes the issue.

if (function_exists('set_magic_quotes_runtime')) {

#2 @desrosj
3 years ago

  • Keywords good-first-bug added
  • Milestone changed from Awaiting Review to Future Release

Hey @0xcrypto,

Welcome to Trac!

We've gone ahead and added a GitHub repository for the RSS Importer plugin:

Would you be interested in creating a PR there for this?

#3 @SergeyBiryukov
3 years ago

  • Keywords needs-patch good-first-bug removed
  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version 5.7.2 deleted

Hi there, welcome to WordPress Trac!

Thanks for the report, we're already tracking this issue in #52074.

Note: See TracTickets for help on using tickets.