Making WordPress.org

Changeset 13364


Ignore:
Timestamp:
03/20/2024 05:42:39 AM (2 years ago)
Author:
dd32
Message:

Profiles: Don't return an error for removing an activity item for a forum thread we didn't record anything for.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/profiles.wordpress.org/public_html/wp-content/plugins/wporg-profiles-activity-handler/wporg-profiles-activity-handler.php

    r12298 r13364  
    436436                                // Remove activity related to a topic or reply.
    437437                                if ( ! $activity_obj ) {
    438                                         return '-1 Activity not previously reported.';
     438                                        // Verbose error on development environments.
     439                                        if ( 'production' != wp_get_environment_type() ) {
     440                                                return '-1 Activity not previously reported.';
     441                                        }
     442
     443                                        // Don't need to worry about this on production.
     444                                        return true;
    439445                                }
    440446
Note: See TracChangeset for help on using the changeset viewer.