Just encountered a bug in hierarchical_select.module 7.x-3.0-alpha1 in the function _hierarchical_select_hierarchy_enforce_deepest on line 1937.

After checking I discovered that the bug is present in the latest dev as well (line 1936 in dev)

The error occurred during a request for child fields.

The error was message was

Strict warning: Only variables should be passed by reference

using php 5.3.5
I was able to fix the error by changing line 1937 from:

$first_child = reset(array_keys($children));
</code
to the lines:
<code>
$keys = array_keys($children);
$first_child = reset($keys);

Comments

Wim Leers’s picture

Title: PHP Strict Warning » PHP Strict Warning in _hierarchical_select_hierarchy_enforce_deepest() on PHP 5.3
Version: 7.x-3.0-alpha1 » 7.x-3.0-alpha2
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.