Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 24th, 2005, 10:55 PM
ralphNOSPAM@primemail.com
Guest
 
Posts: n/a
Default Pass By Ref Error

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

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles