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

merlinofchaos’s picture

Status: Active » Fixed

Whoops. Easy fix checked in. Thanks!

spitgray3’s picture

How did you fix this issue???

Status: Fixed » Closed (fixed)

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

klonos’s picture

Title: PHP warning: Call-time pass-by-reference » Call-time pass-by-reference deprecated in ctools_plugin_api_include(), line 156 of ../ctools/includes/plugins.inc
Version: 6.x-1.x-dev » 7.x-1.x-dev
Priority: Minor » Normal
Status: Closed (fixed) » Active

All latest dev versions of everything here (core, contrib modules) and I've been getting this:

Deprecated function: Call-time pass-by-reference has been deprecated in ctools_plugin_api_include() (line 156 of /var/www/my-site/sites/all/modules/ctools/includes/plugins.inc).
merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

Line 156 of that file is this:

        require_once DRUPAL_ROOT . "/$plugin_info[path]/$file";

There's no pass by reference going on there.

klonos’s picture

Status: Postponed (maintainer needs more info) » Active

I know, mine reads the same too. Still this is what I see, so let me know how you want me to troubleshoot this further.

merlinofchaos’s picture

Status: Active » Closed (won't fix)

I'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.

klonos’s picture

Project: Chaos Tool Suite (ctools) » Internationalization Views
Version: 7.x-1.x-dev » 7.x-3.x-dev
Status: Closed (won't fix) » Active

...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.

klonos’s picture

...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.

webflo’s picture

Status: Active » Closed (cannot reproduce)

I think the issue is fixed. Please re-open issue if the error message still shows up.

johndieter’s picture

Priority: Normal » Critical
Status: Closed (cannot reproduce) » Active

Deprecated 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?

johndieter’s picture

I 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.....

pcoughlin’s picture

The 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).

Jose Reyero’s picture

Project: Internationalization Views » CiviCRM
Version: 7.x-3.x-dev » 4.7.x-1.x-dev

Moving to Civicrm queue.

(Haven't seent his issue with latest i18nviews)

pcoughlin’s picture

Issue summary: View changes

This 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.

pcoughlin’s picture

Status: Active » Closed (won't fix)