By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,441 Members | 1,261 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,441 IT Pros & Developers. It's quick & easy.

Deprecated: Call-time pass-by-reference has been deprecated

P: 2
hi

i'm developing a login form but when i try it i get this error "Deprecated: Call-time pass-by-reference has been deprecated"

it it leads me to line 4 of this function
Expand|Select|Wrap|Line Numbers
  1. function rows_count($result){
  2.     $count=0;
  3.     while($temp = odbc_fetch_into($result, &$counter)){
  4.         $count++;
  5.     }
  6.     return $count;
  7. }
May 11 '10 #1
Share this Question
Share on Google+
1 Reply


Markus
Expert 5K+
P: 6,050
The error says it all really: passing by-reference at call time has been deprecated. That means, you should not be passing your function arguments as references when you call the function.

If you look at the documentation for odbc_fetch_into(), you will see that the $result_array parameter is implicitly passed-by-reference.

Fix: remove the ampersand before $counter.
May 11 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.