[wp-trac] [WordPress Trac] #57341: `Error: Class "Requests" not found` in trunk

WordPress Trac noreply at wordpress.org
Sun Dec 18 23:24:09 UTC 2022


#57341: `Error: Class "Requests" not found` in trunk
-------------------------------------------------+-------------------------
 Reporter:  bjorsch                              |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  6.2
Component:  HTTP API                             |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  has-testing-info has-patch has-      |     Focuses:
  unit-tests commit                              |
-------------------------------------------------+-------------------------

Comment (by jrf):

 Replying to [comment:13 peterwilsoncc]:
 > I'm seeing quite a few plugins that do seem to
 [https://wpdirectory.net/search/01GMKN6TB0GRGSSASAHZAJNY2J reference the
 older file structure directly] in require statements, not just the
 autoloader file.
 >
 > However wise it was for these plugins to do this can be debated but
 WordPress should not throw a fatal error on sites including plugins that
 did so.
 >
 > There are some false positives in the link (security plugins containing
 the file hash been the most common) there are also a quite a number of
 installations that are true positives.

 Thanks for your concern @peterwilsoncc.

 I have reviewed the complete first page of the results and nearly
 everything is false positive (either references in comments, which will
 have no impact, `composer.lock` files or includes for a completely
 different package).

 It looks like a lot of plugins are using some other package, which also
 installs in a `Requests` directory, but is **not** actually the `Requests`
 package we are talking about here.

 **The only non-false positives are**:
 * Real Cookie Banner: GDPR (DSGVO) & ePrivacy Cookie Consent
 * Real Custom Post Order: Create a custom order for your content
 * Real Category Management: Content Management in Category Folders
 * Real Thumbnail Generator: Efficient regeneration of thumbnails in all
 sizes
 * NFT Maker

 These all seem to use the same utility package - `devowl-wp/utils` -
 referencing two files from Requests in the WP directory structure, so in
 reality there is one (**1**) package ''doing_it_wrong'', though those
 `require`s ''are'' wrapped in a `class_exists()` function call and as
 `class_exists()` triggers the autoloader, they shouldn't actually be
 problematic as the `require`s will never be executed.


 Note, the following plugins ''do'' reference files from Requests, but
 **NOT** the ones in the WP directory structure, but in a `vendor`
 directory (or similar) shipped with the plugin. Whether that is wise
 (unless prefixed) is a whole different debate, but not a concern for this
 ticket.
 * Duplicator – WordPress Migration Plugin
 * Razorpay for WooCommerce
 * Appointment and Event Booking Calendar for WordPress – Amelia
 * WCFM Marketplace – Best Multivendor Marketplace for WooCommerce
 * Italy Cookie Choices (for EU Cookie Law & Cookie Notice)
 * AliExpress Dropshipping with Ali2Woo Lite
 * Razorpay Quick Payments
 * Knit Pay – Instamojo, Razorpay, PayU, Cashfree, Stripe, Easebuzz, UPI
 QR, CCAvenue
 * Culqi Integracion
 * WP PHP Console
 * Infogram – Add charts, maps and infographics
 * Razorpay Payment Button Elementor Plugin
 * Razorpay Payment Button Plugin
 * Kata Plus
 * Razorpay for Gravity Forms

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


More information about the wp-trac mailing list