Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: Call-time pass-by-reference has been deprecated #1

Closed
Tuckie opened this issue Aug 25, 2011 · 7 comments
Closed

Warning: Call-time pass-by-reference has been deprecated #1

Tuckie opened this issue Aug 25, 2011 · 7 comments

Comments

@Tuckie
Copy link

Tuckie commented Aug 25, 2011

My install doesn't seem too happy with $file->updateCMSFields(&$fields);

Warning: Call-time pass-by-reference has been deprecated in /srv/www/htdocs/intranet/kickassets/code/KickAssetAdmin.php on line 567

Seems to popup everywhere

@unclecheese
Copy link
Owner

What version of PHP? That ampersand shouldn't be there. There's no need to pass by reference in PHP5 if the variable is an object.


SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Le Thursday, August 25, 2011 à 2:42 PM, Tuckie a écrit :

My install doesn't seem too happy with $file->updateCMSFields(&$fields);

Warning: Call-time pass-by-reference has been deprecated in /srv/www/htdocs/intranet/kickassets/code/KickAssetAdmin.php on line 567

Seems to popup everywhere

Reply to this email directly or view it on GitHub:
#1

@Tuckie
Copy link
Author

Tuckie commented Aug 25, 2011

@unclecheese
Copy link
Owner

Fixed!

@Tuckie
Copy link
Author

Tuckie commented Aug 26, 2011

(Not a hard bug to fix, but...) Much thanks!

@MarcusDalgren
Copy link

Umm I just downloaded the latest version and there's still an ampersand in there. The code looks like this:
if(version_compare(PHP_VERSION, '5.3')) {
$file->updateCMSFields(&$fields);
}
else {
$file->updateCMSFields($fields);
}
I'm running version 5.2.11 but I'm still getting an error related to this. It's on line 600 in KickAssetAdmin.php.
Maybe it wasn't merged in yet?

@unclecheese
Copy link
Owner

5.3 wants it, 5.2 doesn't. That version compare should say >= 0.

Sent from my iPhone

On Aug 29, 2011, at 8:41 AM, smurkasreply@reply.github.com wrote:

Umm I just downloaded the latest version and there's still an ampersand in there. The code looks like this:
if(version_compare(PHP_VERSION, '5.3')) {
$file->updateCMSFields(&$fields);
}
else {
$file->updateCMSFields($fields);
}
I'm running version 5.2.11 but I'm still getting an error related to this. It's on line 600 in KickAssetAdmin.php.
Maybe it wasn't merged in yet?

Reply to this email directly or view it on GitHub:
#1 (comment)

@timsnadden
Copy link

This causes a fatal error for me in php 5.4.

Fatal error: Call-time pass-by-reference has been removed in /path/to/kickassets/code/KickAssetAdmin.php on line 684

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants