Login   Register  
PHP Classes
elePHPant
Icontem

Assigning the return value of new by reference is deprecated

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      PHPXBase  >  All threads  >  Assigning the return value of new by reference is deprecated  >  (Un) Subscribe thread alerts  
Subject:Assigning the return value of new by reference is deprecated
Summary:New warnings in PHP5
Messages:3
Author:Kampman
Date:2012-04-20 19:37:24
Update:2013-03-19 13:53:35
 

  1. Assigning the return value of new by reference is deprecated   Reply   Report abuse  
Picture of Kampman
Kampman
2012-04-20 19:37:24
If I use it, I get these warnings:
Deprecated: Assigning the return value of new by reference is deprecated in Table.class.php on line 108
Table.class.php on line 149
Table.class.php on line 162

And since I am not allowed to change the code ;-)
How can I solve this?

By the way: great job!

  2. Re: Assigning the return value of new by reference is deprecated   Reply   Report abuse  
Picture of prokee
prokee
2013-03-19 13:53:35 - In reply to message 1 from Kampman
Just replace =& to simple = in that rows. By another words: remove the ampersands from 108, 149 and 162 rows.

"& is used in PHP to pass an object to a method / assign a new object to a variable by reference. It is depricated in PHP 5 because PHP 5 passes all variables by reference by default."

  3. Re: Assigning the return value of new by reference is deprecated   Reply   Report abuse  
Picture of Totof
Totof
2014-12-05 12:07:04 - In reply to message 2 from prokee
If replace =& by = the test.php page don't return any content field...