CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Warning: Call-time pass-by-reference has been deprecated in
Pages: [1]

Author Topic: Warning: Call-time pass-by-reference has been deprecated in  (Read 1723 times)

FrTommy

  • I post frequently
  • ***
  • Posts: 273
  • Karma: 2
  • CiviCRM version: 4.5.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.32
  • PHP version: 5.3
Warning: Call-time pass-by-reference has been deprecated in
May 24, 2011, 07:06:27 pm
Fresh install of Drupal 6 and CiviCRM 3.4.1. I'm getting random errors on pages:

Warning: Call-time pass-by-reference has been deprecated in /home/<mysite>/sites/all/modules/civicrm/api/v3/utils.php on line 385

I've searched the forums and the only posts I can find just has a response from Lobo saying Fixed but not telling how it was fixed.


Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Warning: Call-time pass-by-reference has been deprecated in
May 25, 2011, 03:49:30 am
Do you have any code calling the API?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

gholt

  • I post occasionally
  • **
  • Posts: 79
  • Karma: 0
Re: Warning: Call-time pass-by-reference has been deprecated in
May 25, 2011, 08:05:37 pm
I'm getting a similar error when an authenticated user clicks on "View Contact Dashboard". I'm running Drupal 6.20 and CiviCRM 3.4.1.

Here's the error:
Warning: Call-time pass-by-reference has been deprecated in /home/<user>/<mysite>/sites/all/modules/civicrm/api/v3/utils.php on line 385

And I hardly even know what "code calling the API" means, so I certainly haven't added any code that would be triggering that error.

Thanks in advance for anyone that can point us in the right direction!

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Warning: Call-time pass-by-reference has been deprecated in
May 25, 2011, 11:02:51 pm
Hi,

I'm pretty sure that has been fixed - it was a typo. If you copy the latest copy http://svn.civicrm.org/civicrm/branches/v3.4/api/v3/utils.php it should fix it.

To be honest I would wait for 3.4.2 if you can - there are quite a few fixes in it that could save you time
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Warning: Call-time pass-by-reference has been deprecated in
May 25, 2011, 11:11:31 pm
The problem is in this statement in api/v3/utils.php:
Code: [Select]
    $fields = array_keys(_civicrm_api3_build_fields_array(&$dao, $uniqueFields));
that has to be changed to:
Code: [Select]
    $fields = array_keys(_civicrm_api3_build_fields_array($dao, $uniqueFields));
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

gholt

  • I post occasionally
  • **
  • Posts: 79
  • Karma: 0
Re: Warning: Call-time pass-by-reference has been deprecated in
May 26, 2011, 07:29:29 pm
Eileen and Erik, thanks!
I decided to just change that line of code, since that's pretty easy. It worked! That'll keep me going until 3.4.2.

Thanks again.

FrTommy

  • I post frequently
  • ***
  • Posts: 273
  • Karma: 2
  • CiviCRM version: 4.5.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.32
  • PHP version: 5.3
Re: Warning: Call-time pass-by-reference has been deprecated in
May 30, 2011, 03:00:20 pm
As far as I know there's not any api calls. this is a fresh install.

I just downloaded the newest utils.php that Eileen suggested. Think it fixed it.

Will upgrade when 3.4.2 comes out.

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Warning: Call-time pass-by-reference has been deprecated in
May 30, 2011, 11:28:19 pm
I did check the api/v3/utils.php that is currently in the svn trunk, and that one has been fixed.
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

gholt

  • I post occasionally
  • **
  • Posts: 79
  • Karma: 0
Re: Warning: Call-time pass-by-reference has been deprecated in
May 31, 2011, 10:29:15 am
Great! Thank you Erik!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Warning: Call-time pass-by-reference has been deprecated in

This forum was archived on 2017-11-26.