You are here:  » Described patch for WP 6.5.x and PHP 8.x compatibility


Described patch for WP 6.5.x and PHP 8.x compatibility

Submitted by support on Tue, 2024-05-21 12:48 in

Hi everyone,

Before posting a patched download as there are further changes required regarding forthcoming deprecations which will require more work, these should be the minimum changes to the current v3 for WordPress plugin distribution for compatibility with the lastest versions of Wordpress and PHP.

Edit pto.php and look for the following code beginning at line 446:

       (!isset($rules[$k]))
       ||
       ($rules[$k] <> $rules[$v])

...and REPLACE with:

       (!isset($rules[$k]))
       ||
       (!isset($rules[$v]))
       ||
       ($rules[$k] <> $rules[$v])

Then look for the following code at (now) line 768:

  if(is_array($atts))

...and REPLACE with:

  if(is_array($atts) && count($atts))

Edit pto_search.php and look for the following code at line 1010:

  function pto_search_widget()

...and REPLACE with:

  public function __construct()

Then look for the following code at line 1073:

  function pto_search_filters_widget()

...and REPLACE with:

  public function __construct()

Edit pto_featured.php and look for the following code at line 220:

  function pto_featured_widget()

...and REPLACE with:

  public function __construct()

Finally edit pto_atoz.php and look for the following code beginning at line 169:

  function pto_atoz_widget()
  {
    parent::WP_Widget(false, $name = "PriceTapestry.org A to Z");
  }

...and REPLACE with:

  public function __construct()
  {
    parent::__construct(false, $name = "PriceTapestry.org A to Z");
  }

Cheers,
David
--
PriceTapestry.org

Submitted by Perce2 on Sun, 2024-05-26 10:37

Thank you David for the maintenence update instructions.
Am now able to update WP to the latest version.

Graham