Changeset 10002
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/classes/class-bp-xprofile-group.php
r9974 r10002 141 141 $query = $wpdb->query( $sql ); 142 142 143 // Bail if query fails 144 if ( empty( $query )|| is_wp_error( $query ) ) {143 // Bail if query fails. If `$query` is 0, it means the save was successful, but no fields were updated. 144 if ( false === $query || is_wp_error( $query ) ) { 145 145 return false; 146 146 } -
trunk/tests/phpunit/testcases/xprofile/class-bp-xprofile-group.php
r9819 r10002 6 6 */ 7 7 class BP_Tests_BP_XProfile_Group extends BP_UnitTestCase { 8 9 /** 10 * @ticket BP6552 11 */ 12 public function test_save_should_not_return_false_when_no_fields_have_been_altered() { 13 $g = $this->factory->xprofile_group->create(); 14 $group = new BP_XProfile_Group( $g ); 15 16 $saved = $group->save(); 17 18 $this->assertEquals( $g, $saved ); 19 } 20 8 21 /** 9 22 * @group fetch_visibility_level
Note: See TracChangeset
for help on using the changeset viewer.