Skip to:

Opened 14 years ago

Closed 14 years ago

Last modified 13 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's profile junsuijin Owned by: junsuijin's profile junsuijin
Milestone: 1.2 Priority: major
Severity: normal Version:
Component: Core Keywords: has-patch tested reporter-feedback


WordPress has changed the way it gets user meta as seen in

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 14 years ago.
checks if $activity is an array and appropriately converts to $activity[0]

Download all attachments as: .zip

Change History (7)

14 years ago

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

#1 @DJPaul
14 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
14 years ago

I reported this to the WP Trac ticket that includes the original commit:
It seems that back compat was restored now.
However, future versions of BP should probably do the suggested is_array check.

#3 @nacin
14 years ago

Backwards compatibility crisis averted, see I imagine closing this would make sense, as the switch from functions deprecated in 3.0 would happen in one swoop.

#4 @cnorris23
14 years ago

  • Keywords reporter-feedback added

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
14 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
13 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.