DevinWalker / wp-rollback

Rollback any WordPress.org plugin or theme to a previous (or newer) version.
https://wprollback.com
81 stars 22 forks source link

The plugin should have no notices on PHP 7.4 #52

Closed Benunc closed 4 years ago

Benunc commented 4 years ago

Bug Report

User Story

As a user, I want the plugin to function in PHP 7.4 with no notices.

Current Behavior

When processing a rollback, theres a notice of


Notice: compact(): Undefined variable: title in /Users/steward/Local Sites/flyfest/app/public/wp-content/plugins/wp-rollback/includes/rollback-action.php on line 37
--

1 | 0.0001 | 374048 | {main}( ) | .../index.php:0
2 | 0.0001 | 375296 | require_once( '/Users/steward/Local Sites/flyfest/app/public/wp-admin/admin.php' ) | .../index.php:10
3 | 0.4791 | 4041032 | do_action( ) | .../admin.php:254
4 | 0.4791 | 4041408 | WP_Hook->do_action( ) | .../plugin.php:478
5 | 0.4791 | 4041408 | WP_Hook->apply_filters( ) | .../class-wp-hook.php:311
6 | 0.4792 | 4042536 | WP_Rollback->html( ) | .../class-wp-hook.php:287
7 | 0.4809 | 4069872 | include( '/Users/steward/Local Sites/flyfest/app/public/wp-content/plugins/wp-rollback/includes/rollback-action.php' ) | .../wp-rollback.php:368
8 | 0.4809 | 4070464 | compact ( )

Expected Behavior

I expect no notices.

Bug Type

Steps to Reproduce

  1. Install the plugin on PHP 7.4
  2. Turn on Debug
  3. Rollback any plugin.
  4. See error

Related

ticket on priority: https://secure.helpscout.net/conversation/1231893510/70625?folderId=2452562 free support: https://wordpress.org/support/topic/php-notice-161/

Acceptance Criteria

DevinWalker commented 4 years ago

This was fixed here: 192f6be214ac534dedf0a4fd392b4b735bd23d1e and fully tested on PHP 5.6, 7.2, and 7.4.