#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)
Change History (7)
#1
@
15 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
@
15 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
@
15 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
@
15 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?
checks if $activity is an array and appropriately converts to $activity[0]