Hi,

I've just installed node hierarchy. I turned on Node Hierarcy, saved and then turned on Node Hierarchy Views Embed and got the following error:

Fatal error: Only variables can be passed by reference in \sites\all\modules\nodehierarchy\nodehierarchy_views\nodehierarchy_views.module on line 99

I installed node hierarchy 6.x_1.1, on Drupal 6.6.

Cheers,
Ian

Comments

joneian’s picture

I guess this is because I'm using an older version of PHP (4.4.7).

I was able to fix the issue by changing:
$first_arg = current((array)$view->display['default']->display_options['arguments']);

to:
$first_arg = current($tmp = (array)$view->display['default']->display_options['arguments']);

See this post

Cheers,
Ian

jinesh.m’s picture

Version: 6.x-1.1 » 6.x-1.2

I installed node hierarchy 6.x_1.2 on Drupal 6.9 and got a similar fatal error as the one described previously, except it was on line 133. im using an older version of PHP (4.3.10).

applying the above fix resolved the issue.

ronan’s picture

Thanks for the reports. I don't run php 4 anywhere anymore, so I missed this. I've applied the patch (with a slight modification and an explanatory comment). Let me know if the latest dev runs on php 4 now.

Thanks
Ronan

ronan’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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