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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • adamkini
    New Member
    • May 2010
    • 2

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

    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
    Code:
    function rows_count($result){
        $count=0;
       [I] while($temp = odbc_fetch_into($result, &$counter)){[/I]
            $count++;
        }
        return $count;
    }
    Last edited by Dormilich; May 11 '10, 07:29 PM. Reason: Please use [code] tags when posting code
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    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.

    Comment

    Working...