[buddypress-trac] [BuddyPress Trac] #9127: Critical error when updating xProfile fields through REST API using PHP 8+

buddypress-trac noreply at wordpress.org
Mon Apr 8 13:27:18 UTC 2024


#9127: Critical error when updating xProfile fields through REST API using PHP 8+
-------------------------------------------------+-------------------------
 Reporter:  niftythree                           |       Owner:
                                                 |  espellcaste
     Type:  defect (bug)                         |      Status:  new
 Priority:  low                                  |   Milestone:  14.0.0
Component:  REST API                             |     Version:  12.4.0
 Severity:  minor                                |  Resolution:
 Keywords:  has-unit-tests needs-testing-info    |
  has-dev-note                                   |
-------------------------------------------------+-------------------------
Changes (by espellcaste):

 * keywords:   => has-unit-tests needs-testing-info has-dev-note
 * priority:  normal => low
 * version:   => 12.4.0
 * severity:  normal => minor


Comment:

 @niftythree Sorry it took me this long to test this. But so far, I'm
 unable to replicate the issue.

 I tested passing the value as such: "I don't travel often" and as
 suggested by your example: "I don\\'t travel often". Tested on PHP 8.1 and
 8.2.

 I don't get the error logged or the PHP warning.

 > Also getting: PHP Warning: Attempt to read property "display_name" on
 bool in /wp-content/plugins/buddypress/bp-messages/classes/class-bp-rest-
 messages-endpoint.php on line 879

 The fact that you are getting this warning from the messages endpoint
 indicates to me there is something else going on in your application that
 might be affecting your test, but not sure what is based on the
 information provided.

 Can you share more information that might help? Maybe the BuddyPress
 version, if you are using other plugins, etc. Did you test with the
 endpoint only and can confirm if it works correctly?

 For context, I created a unit test to confirm this is working properly
 here: https://github.com/buddypress/BP-REST/pull/497

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/9127#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list