Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#2048 closed defect (bug) (wontfix)

Warning: strtotime() expects parameter 1 to be string, array given in .../buddypress/bp-core.php on line 1464

Reported by: junsuijin Owned by: junsuijin
Milestone: 1.2 Priority: major
Severity: normal Version:
Component: Core Keywords: has-patch tested reporter-feedback
Cc:

Description

WordPress has changed the way it gets user meta as seen in http://core.trac.wordpress.org/changeset/13300

Now it will always return an array even if there is only one item, unless true is passed as the 3rd argument to the new get_user_meta. I have included a patch with a proposed solution to the first php warning I have encountered due to this problem (encountered on all frontend pages), but I have not combed the BuddyPress pages looking for related issues. This and similar problems may be worth handling via bp-core/bp-core-wpabstraction.php

This problem can be reproduced with current trunks of WP and BP.

Attachments (1)

2048.patch (389 bytes) - added by junsuijin 10 years ago.
checks if $activity is an array and appropriately converts to $activity[0]

Download all attachments as: .zip

Change History (7)

@junsuijin
10 years ago

checks if $activity is an array and appropriately converts to $activity[0]

#1 @DJPaul
10 years ago

  • Milestone changed from 1.2.2 to Future Release

This WP changes seems to be in 3.0-alpha which BuddyPress has not done any support work for yet. I'm bumping this to 'future release' rather than '1.3' as I'm not sure when/if 1.3 and 3.0 will coincide :)

#2 @TobiasBg
10 years ago

I reported this to the WP Trac ticket that includes the original commit:
http://core.trac.wordpress.org/ticket/10837#comment:18
It seems that back compat was restored now.
However, future versions of BP should probably do the suggested is_array check.

#3 @nacin
10 years ago

Backwards compatibility crisis averted, see http://core.trac.wordpress.org/ticket/10837. I imagine closing this would make sense, as the switch from functions deprecated in 3.0 would happen in one swoop.

#4 @cnorris23
10 years ago

  • Keywords reporter-feedback added

@junsuijin,
Could you revert your patch, update to WP Trunk revision 13329 or above, and confirm that this issue is resolved as per nacin's comment?

#5 @junsuijin
10 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

This has indeed been fixed as suggested in nacin's comment. Closing this ticket as wontfix.

#6 @johnjamesjacoby
8 years ago

  • Component set to Core
  • Keywords changed from has-patch, tested reporter-feedback to has-patch tested reporter-feedback
  • Milestone changed from Future Release to 1.2
  • Severity set to normal

Moving closed ticket out of Future Release.

Note: See TracTickets for help on using tickets.