How do I fix RGrid for the newest version of PHP?

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Victor Harrison on 11th January 2016
HELP! On line 512 of RGRAPH (or line 497 of Datagrid) is this:
<?php call_user_func($this->rowcallback, &$row)?>

Problem is &$row is invalid in newest version of PHP. Changing this line to
<?php call_user_func($this->rowcallback, $row)?> syntactically works, but all callbacks no longer display. What is the correct way to fix this?

Posted by Richard on 11th January 2016

IIRC it's a reference issue - this may work:

<?php call_user_func_array($this->rowcallback, array(&$row)) ?>

(BTW this is not RGraph - it's the old Datagrid PHP class)


Add a reply

« Back to message list