Connecting Tech Pros Worldwide Help | Site Map

Pass By Ref Error

  #1  
Old August 24th, 2005, 10:55 PM
ralphNOSPAM@primemail.com
Guest
 
Posts: n/a
I'm getting this error on my PHP CLI script. If this feature is being
depreciated, then how are we to pass vars by reference???

Function parse_for_wind($php_line, &$php_total_wind_matches,
&$php_highest_wind)

[Wed Aug 24 16:22:08 2005] [error] PHP Warning: Call-time
pass-by-reference has been deprecated - argument passed by value; If
you would like to pass it by reference, modify the declaration of
parse_ceil_pattern().


  #2  
Old August 25th, 2005, 01:45 AM
ZeldorBlat
Guest
 
Posts: n/a

re: Pass By Ref Error


>From the looks of your error the problem isn't in your declaration of
parse_for_wind but rather somewhere else where you call
parse_ceil_pattern().

I'm guessing that somewhere else in your code you have something like:

//some code
parse_ceil_pattern(&$arg1, &$arg2...);
//some more code

If you want parse_ceil_pattern to take it's arguments as references,
you need to change the function declaration -- much like you have for
parse_for_wind().

  #3  
Old August 25th, 2005, 01:05 PM
R. Rajesh Jeba Anbiah
Guest
 
Posts: n/a

re: Pass By Ref Error


ralphNOSPAM@primemail.com wrote:
<snip>[color=blue]
> [Wed Aug 24 16:22:08 2005] [error] PHP Warning: Call-time
> pass-by-reference has been deprecated - argument passed by value; If
> you would like to pass it by reference, modify the declaration of
> parse_ceil_pattern().[/color]

http://in.php.net/language.references.pass

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com

  #4  
Old August 25th, 2005, 04:15 PM
ralphNOSPAM@primemail.com
Guest
 
Posts: n/a

re: Pass By Ref Error


On Wed, 24 Aug 2005 14:45:04 -0700, ralphNOSPAM@primemail.com wrote:
[color=blue]
>I'm getting this error on my PHP CLI script. If this feature is being
>depreciated, then how are we to pass vars by reference???
>
>Function parse_for_wind($php_line, &$php_total_wind_matches,
>&$php_highest_wind)
>
>[Wed Aug 24 16:22:08 2005] [error] PHP Warning: Call-time
>pass-by-reference has been deprecated - argument passed by value; If
>you would like to pass it by reference, modify the declaration of
>parse_ceil_pattern().
>[/color]

Thanks everyone - that was the answer; pass by reference using arrays.

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
I'm getting an error when I passed by ref a dataset to a new form =?Utf-8?B?UHVjY2E=?= answers 4 June 28th, 2007 08:45 PM
pass by ref in VB .net nina answers 0 November 21st, 2005 03:18 AM
pass by ref vs pass by pointer Radde answers 38 August 23rd, 2005 07:35 PM
Passing an Object by Ref Mike Guerrieri answers 6 July 22nd, 2005 12:45 AM