Skip to:
Content

BuddyPress.org

Changeset 7134


Ignore:
Timestamp:
06/03/2013 01:53:33 AM (9 years ago)
Author:
boonebgorges
Message:

BP_Groups_Group::id should be 0 for non-existent groups

Fixes #4185

Props chriskeeble

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-classes.php

    r7111 r7134  
    9292                    $this->mods[] = $user;
    9393            }
     94        } else {
     95            $this->id = 0;
    9496        }
    9597    }
  • trunk/tests/testcases/groups/class-bp-groups-group.php

    r7112 r7134  
    1212    }
    1313
     14    /** __construct()  ***************************************************/
     15
     16    /**
     17     * @group __construct
     18     */
     19    public function test_non_existent_group() {
     20        $group = new BP_Groups_Group( 123456789 );
     21        $this->assertSame( 0, $group->id );
     22    }
     23
    1424    /** get() ************************************************************/
    1525
Note: See TracChangeset for help on using the changeset viewer.