I have 7.x-1.x-dev of the module installed. I created a view which has a php field with some calcuation in the value part. I Selected "sort numerically" in enable click sort. I started error message in the error logs as

Function name must be a string in views_php/plugins/views/views_php_handler_field.inc on line 185

Thanks,
Sadashiv.

Issue fork views_php-2368085

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sadashiv’s picture

Status: Active » Needs review
FileSize
577 bytes

I debugged and found that it comes as a array so I called call_user_func to fix the issue.

I am attaching the patch for the same.

Hth,
Sadashiv.

sadashiv’s picture

sadashiv’s picture

Priority: Normal » Major

Hi,

Would be great if someone can test, verify that patch works and move it ahead.

Thanks,
Sadashiv.

zakir.gori’s picture

The same issue came to me.
For me it was view php module. I use your following code from #2 patch in my view php module
//$result = $function($row1->{$this->field_alias}, $row2->{$this->field_alias});
$result = call_user_func($function,$row1->{$this->field_alias},$row2->{$this->field_alias});
location : modules/views_php/plugins/views/views_php_handler_field.inc

Its perfectly work for me.

Thanks for patch

Liam Morland’s picture

Category: Support request » Bug report
Status: Needs review » Needs work

If this is still an issue, please put in an issue fork. Please check coding standards.

djdevin made their first commit to this issue’s fork.