I just wanted to share my experience creating "subcohorts" and using an hierselect form field to filter the results.
After upgrading to 4.5 I was getting a notice when using the hierselect form field:
Deprecated <b>: strlen(): Passing null to parameter #1 ($string) of type string is deprecated
As a fix, I replaced "if (strlen($onReset)) {" with "if (strlen((string)$onReset)) {" on line 500 of \lib\pear\HTML\QuickForm\hierselect.php
For anyone interested, we are using cohorts as "Locations" where users work. In 4.5, I have created a custom field menu for cohorts to choose which "Region" the "Location" is in (prior to this, we were having to put cohorts into course categories created for each Region, which is really cumbersome). I have a local plugin of custom reports, and for these reports, I have created a filter form with an hierselect field showing the Regions (the custom field menu options), and then drilling down to the Locations in the chosen Region. The report then filters the users by the chosen Location or All users in the chosen Region if no Location is selected.
Another thing to mention, the hierselect form field does not have css formatting compatible with forms, so that has to be added for .fhierselect. Other than the above issues. This does do what we need.