Skip to:
Content

BuddyPress.org

Opened 2 years ago

Closed 2 years ago

#8726 closed defect (bug) (fixed)

I installed Child Theme Config and performed

Reported by: baasui's profile baasui Owned by: imath's profile imath
Milestone: 11.0.0 Priority: normal
Severity: normal Version:
Component: Navigation Keywords: has-patch
Cc:

Description (last modified by imath)

I installed Child Theme Config (By Lilaea Media)and performed analysis before making the close, and these errors popped up. The plugin told me to report the bug, so I am doing just that. I am on Windows 10, the browser is Chrome Based Vivaldi Browser. the server is PHP 8.0 Version. Thank you for a beautiful plugin.

here are the errors:

1) Deprecated: Return type of EM_DateTime::createFromFormat($format, $time, $timezone = null) in events-manager/classes/em-datetime.php on line 333

2) Deprecated: Return type of EM_DateTime::format($format = 'Y-m-d H:i:...') in events-manager/classes/em-datetime.php on line 69

3) Deprecated: Return type of EM_DateTime::modify($modify) in events-manager/classes/em-datetime.php on line 214

4) Deprecated: Return type of EM_DateTime::add($DateInterval) in events-manager/classes/em-datetime.php on line 228

5) Deprecated: Return type of EM_DateTime::sub($DateInterval) in events-manager/classes/em-datetime.php on line 246

6) Deprecated: Return type of EM_DateTime::getTimezone() in events-manager/classes/em-datetime.php on line 283

7) Deprecated: Return type of EM_DateTime::setTimezone($timezone = false) in events-manager/classes/em-datetime.php on line 166

8) Deprecated: Return type of EM_DateTime::setTime($hour, $minute, $second = null, $microseconds = null) in events-manager/classes/em-datetime.php on line 181

9) Deprecated: Return type of EM_DateTime::setDate($year, $month, $day) in events-manager/classes/em-datetime.php on line 192

10) Deprecated: Return type of EM_DateTime::setISODate($year, $week, $day = null) in events-manager/classes/em-datetime.php on line 203

11) Deprecated: Return type of EM_DateTime::setTimestamp($timestamp) in events-manager/classes/em-datetime.php on line 153

12) Deprecated: Return type of EM_DateTimeZone::getName() in events-manager/classes/em-datetimezone.php on line 65

13) Deprecated: Return type of EM_DateTimeZone::getTransitions($timestamp_begin = null, $timestamp_end = null) in events-manager/classes/em-datetimezone.php on line 77

14) Deprecated: Return type of EM_Taxonomy_Terms::current() in events-manager/classes/em-taxonomy-terms.php on line 322

15) Deprecated: Return type of EM_Taxonomy_Terms::next() in events-manager/classes/em-taxonomy-terms.php on line 330

16) Deprecated: Return type of EM_Taxonomy_Terms::key() in events-manager/classes/em-taxonomy-terms.php on line 326

17) Deprecated: Return type of EM_Taxonomy_Terms::valid() in events-manager/classes/em-taxonomy-terms.php on line 334

18) Deprecated: Return type of EM_Taxonomy_Terms::rewind() in events-manager/classes/em-taxonomy-terms.php on line 319

19) Deprecated: Return type of EM_Taxonomy_Terms::count() in events-manager/classes/em-taxonomy-terms.php on line 339

20) Deprecated: Return type of EM_Bookings::current() in events-manager/classes/em-bookings.php on line 813

21) Deprecated: Return type of EM_Bookings::next() in events-manager/classes/em-bookings.php on line 823

22) Deprecated: Return type of EM_Bookings::key() in events-manager/classes/em-bookings.php on line 818

23) Deprecated: Return type of EM_Bookings::valid() in events-manager/classes/em-bookings.php on line 828

24) Deprecated: Return type of EM_Bookings::rewind() in events-manager/classes/em-bookings.php on line 809

25) Deprecated: Return type of EM_Notices::current() in events-manager/classes/em-notices.php on line 242

26) Deprecated: Return type of EM_Notices::next() in events-manager/classes/em-notices.php on line 250

27) Deprecated: Return type of EM_Notices::key() in events-manager/classes/em-notices.php on line 246

28) Deprecated: Return type of EM_Notices::valid() in events-manager/classes/em-notices.php on line 254

29) Deprecated: Return type of EM_Notices::rewind() in events-manager/classes/em-notices.php on line 239

30) Deprecated: Return type of EM_Notices::jsonSerialize() in events-manager/classes/em-notices.php on line 228

31) Deprecated: Return type of EM_Tickets_Bookings::current() in events-manager/classes/em-tickets-bookings.php on line 301

32) Deprecated: Return type of EM_Tickets_Bookings::next() in events-manager/classes/em-tickets-bookings.php on line 315

33) Deprecated: Return type of EM_Tickets_Bookings::key() in events-manager/classes/em-tickets-bookings.php on line 308

34) Deprecated: Return type of EM_Tickets_Bookings::valid() in events-manager/classes/em-tickets-bookings.php on line 319

35) Deprecated: Return type of EM_Tickets_Bookings::rewind() in events-manager/classes/em-tickets-bookings.php on line 294

36) Deprecated: Return type of EM_Tickets_Bookings::count() in events-manager/classes/em-tickets-bookings.php on line 325

37) Deprecated: Return type of EM_Tickets::current() in events-manager/classes/em-tickets.php on line 266

38) Deprecated: Return type of EM_Tickets::next() in events-manager/classes/em-tickets.php on line 277

39) Deprecated: Return type of EM_Tickets::key() in events-manager/classes/em-tickets.php on line 270

40) Deprecated: Return type of EM_Tickets::valid() in events-manager/classes/em-tickets.php on line 281

41) Deprecated: Return type of EM_Tickets::rewind() in events-manager/classes/em-tickets.php on line 260

42) Deprecated: Return type of EM_Tickets::count() in events-manager/classes/em-tickets.php on line 287

43) Deprecated: Return type of MyCLabs\Enum\Enum::jsonSerialize() in woocommerce-payments/vendor/myclabs/php-enum/src/Enum.php on line 246

44) Deprecated: Return type of Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\ISO3166\ISO3166::count() in google-listings-and-ads/vendor/league/iso3166/src/ISO3166.php on line 111

45) Deprecated: Return type of Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\ISO3166\ISO3166::getIterator() in google-listings-and-ads/vendor/league/iso3166/src/ISO3166.php on line 123

46) Deprecated: Return type of BP_Core_BP_Nav_BackCompat::offsetExists($offset) in buddypress/bp-core/classes/class-bp-core-bp-nav-backcompat.php on line 122

47) Deprecated: Return type of BP_Core_BP_Nav_BackCompat::offsetGet($offset) in buddypress/bp-core/classes/class-bp-core-bp-nav-backcompat.php on line 97

48) Deprecated: Return type of BP_Core_BP_Nav_BackCompat::offsetSet($offset, $value) in buddypress/bp-core/classes/class-bp-core-bp-nav-backcompat.php on line 63

49) Deprecated: Return type of BP_Core_BP_Nav_BackCompat::offsetUnset($offset) in buddypress/bp-core/classes/class-bp-core-bp-nav-backcompat.php on line 148

Attachments (1)

8726.patch (2.3 KB) - added by imath 2 years ago.

Download all attachments as: .zip

Change History (6)

#1 @imath
2 years ago

  • Description modified (diff)

#2 @imath
2 years ago

  • Description modified (diff)

#3 @imath
2 years ago

  • Component changed from Core to Navigation
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 11.0.0

Hi @baasui

Thanks for your feedback, I've edited the description of the ticket to show you how to identify plugins in your error log. 45 errors on the 49 you reported do not belong to BuddyPress.

About errors 46 to 49, the only ones belonging to BuddyPress, we haven't noticed them so far because they are generated by a very old back compatibility mechanism. I suspect the Events Manager is using this mechanism and really should update its code to use the regular way of generating BuddyPress navigation.

We will only fix BuddyPress deprecated notices. And I believe we should add other deprecation notices to warn other plugins they should update their code and stop ending using BP_Core_BP_Nav_BackCompat.

@imath
2 years ago

#4 @imath
2 years ago

  • Keywords has-patch added; needs-patch removed

8726.patch is fixing the issue for PHP 8.1 deprecated notices.

NB: after this fix has been committed, the PR on #8649 will need to be updated.

#5 @imath
2 years ago

  • Owner set to imath
  • Resolution set to fixed
  • Status changed from new to closed

In 13311:

Avoid PHP 8.1 ArrayAccess Return Type deprecation notices

The BP_Core_BP_Nav_BackCompat is implementing the ArrayAccess class to provide backward compatibility to BuddyPress plugins directly modifying the buddypress()->bp_nav global since BuddyPress 2.3.

PHP 8.1 added a deprecation notice if a class declaration has an incompatible return type (or if the return type lacks: which is the case for BP_Core_BP_Nav_BackCompat) with the parent it extends.

As BuddyPress supports PHP back to version 5.6, we need to use the #ReturnTypeWillChange attribute to maintain compatibility with this version and avoid the deprecation notice in PHP 8.x.

Fixes #8726

Note: See TracTickets for help on using tickets.