Changes between Initial Version and Version 1 of Ticket #4636, comment 7
- Timestamp:
- 05/13/2013 11:42:49 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #4636, comment 7
initial v1 3 3 In general, I'm a big fan of returning `WP_Error` objects rather than a dummy `false` value. It's possible (however unlikely) that changing the return value of these functions will break something else, though. For example, if someone runs a check like this: 4 4 5 `$success = xprofile_set_field_data( $foo, $bar, $baz ); 5 {{{ 6 $success = xprofile_set_field_data( $foo, $bar, $baz ); 6 7 if ( false === $success ) { // or even ! $success 7 8 echo 'oh noez'; 8 }` 9 } 10 }}} 9 11 10 12 It's fairly unlikely that we're doing anything like this in BuddyPress, but could you please grep through the codebase to be sure? It's almost certain that we'll cause problems with at least some plugins, but IMO it's worth it in this case, because the `WP_Error` objects are just so much better (though I'd like to hear another dev chime in with an opinion on that).