Line 94 of primary_term.module has an issue - line 93 checks to see if $vocab['#options'] is an array, and then 94 tries to trim that array. But trim() expects a string (see http://us.php.net/trim for more info). And then there's no active code in the conditional established by line 94 anyway.
if(is_array($vocab['#options'])){
if(strlen(trim($vocab['#options']))){
// not sure why we have the line below. from old days.
// unset($vocab['#options'][0]);
}
$terms = $terms + $vocab['#options'];
}
And trying to trim an array throws a php error. So, since it doesn't actually do anything but throw an error, these lines of code should go away.
| Comment | File | Size | Author |
|---|---|---|---|
| remove_extraneous_trim_primary_term.patch | 803 bytes | srjosh |
Comments
Comment #1
brianV commentedSensible patch. Committed:
http://drupal.org/cvs?commit=435620