Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I just updated to the latest dev version of ctools, and received the following php warning:
Warning: Call-time pass-by-reference has been deprecated in [path to drupal]\sites\all\modules\ctools\page_manager\plugins\tasks\page.admin.inc on line 583
Comments
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedWhoops. Easy fix checked in. Thanks!
Comment #2
spitgray3 CreditAttribution: spitgray3 commentedHow did you fix this issue???
Comment #4
klonosAll latest dev versions of everything here (core, contrib modules) and I've been getting this:
Comment #5
merlinofchaos CreditAttribution: merlinofchaos commentedLine 156 of that file is this:
There's no pass by reference going on there.
Comment #6
klonosI know, mine reads the same too. Still this is what I see, so let me know how you want me to troubleshoot this further.
Comment #7
merlinofchaos CreditAttribution: merlinofchaos commentedI'm not really sure how to troubleshoot this, to be honest. You're seeing a warning that can't possibly happen with the code we have now, and it doesn't happen on anybody else's test systems that I've heard about. It certainly doesn't happen on mine.
Maybe it's not the file you think it is (multiple installs of the module?) Maybe it's from another site? Maybe it's a hacked version of the module?
I just don't see what we can do about this; as near as I can guess, it's something whacky on your system that I have no way to understand, so I'm closing the issue.
Comment #8
klonos...ok Earl, I've managed to narrow this down to i18nviews, so I'm changing this issue over to that project. Its latest 7.x-3.x-dev version's date matches the date when I last updated my site's modules and when I started having this error.
Comment #9
klonos...could be a dupe of #1294330: Warning: Call-time pass-by-reference has been deprecated in \i18nviews\includes\i18 (or at least related/similar), but -as I report there- replacing all occurrences of "&$" with "$" in /includes/i18nviews.views.inc seems to solve this issue.
Comment #10
webflo CreditAttribution: webflo commentedI think the issue is fixed. Please re-open issue if the error message still shows up.
Comment #11
johndieter CreditAttribution: johndieter commentedDeprecated function: Call-time pass-by-reference has been deprecated in ctools_plugin_api_include() (line 156 of /var/www/drupal/sites/all/modules/ctools/includes/plugins.inc).
I have no /i18nviews.views.inc
How can I find what this error really is?
Comment #12
johndieter CreditAttribution: johndieter commentedI added this code:
if (file_exists(DRUPAL_ROOT . "/$plugin_info[path]/$file")) {
watchdog("oh my before", DRUPAL_ROOT . "/$plugin_info[path]/$file");
require_once DRUPAL_ROOT . "/$plugin_info[path]/$file";
watchdog("oh my after", DRUPAL_ROOT . "/$plugin_info[path]/$file");
}
and it looks like civicrm is the culprit?
/var/www/drupal/sites/all/modules/civicrm/drupal/modules/views/civicrm.views.inc
What should I look for in this file to fix / report this to civicrm?
oh my after 2011-12-13 15:33 /var/www/drupal/sites/all/modules/civicrm/drupal... admin
php 2011-12-13 15:33 Deprecated function: Call-time pass-by-reference has... admin
php 2011-12-13 15:33 Deprecated function: Call-time pass-by-reference has... admin
php 2011-12-13 15:33 Deprecated function: Call-time pass-by-reference has... admin
php 2011-12-13 15:33 Deprecated function: Call-time pass-by-reference has... admin
php 2011-12-13 15:33 Deprecated function: Call-time pass-by-reference has... admin
php 2011-12-13 15:33 Deprecated function: Call-time pass-by-reference has... admin
oh my before 2011-12-13 15:33 /var/www/drupal/sites/all/modules/civicrm/drupal... admin
oh my after 2011-12-13 15:33 /var/www/drupal/sites/all/modules/views/mod... admin
oh my before 2011-12-13 15:33 /var/www/drupal/sites/all/modules/views/modul... admin
oh my after 2011-12-13 15:33 /var/www/drupal/sites/all/modules/views_slide... admin
oh my before.....
Comment #13
pcoughlin CreditAttribution: pcoughlin commentedThe error:
Deprecated function: Call-time pass-by-reference has been deprecated in ctools_plugin_api_include()
The error goes away when the "&" is removed from the function parameter "&$data" as in:
Before: _civicrm_core_data (&$data, $enabled);
After: _civicrm_core_data ($data, $enabled);
As jdieter says, in file: sites/all/modules/civicrm/drupal/modules/views/civicrm.views.inc
There are 7 function calls between lines 83-111 (remove the & before $data on each):
_civicrm_core_data (&$data, $enabled);
_civicrm_campaign_data (&$data, $enabled);
_civicrm_contribute_data (&$data, $enabled);
_civicrm_event_data (&$data,$enabled);
_civicrm_grant_data (&$data, $enabled);
_civicrm_mail_data (&$data, $enabled);
_civicrm_member_data (&$data, $enabled);
There are other &$xxxxxx parameters used in the file, but those have not produced the error for me yet (so I will wait until they do or the next release which should clean this up).
Comment #14
Jose Reyero CreditAttribution: Jose Reyero commentedMoving to Civicrm queue.
(Haven't seent his issue with latest i18nviews)
Comment #15
pcoughlin CreditAttribution: pcoughlin as a volunteer commentedThis issue is very old and has been fixed. Just looking back through issues where I commented.
I believe this was due to upgrading from older PHP version.
Please Close.
Comment #16
pcoughlin CreditAttribution: pcoughlin as a volunteer commented