prinsich / php-excel-reader

Automatically exported from code.google.com/p/php-excel-reader
0 stars 0 forks source link

Assigning the return value of new by reference is deprecated in 5.3 #82

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Just including or requiring the file and setting error reporting to E_STRICT

What is the expected output? What do you see instead?
Expecting pages to load without problems and processing to continue. However 
require[_once]() throws an error and stops

Please provide any additional information below.
excel_reader2.php, line 916

Original issue reported on code.google.com by oliver.k...@gmail.com on 2 Aug 2010 at 11:32

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
problem is in 
 $this->_ole =& new OLERead();
sorry for obviousness, but it can be fixed with, for example, this
 $t = new OLERead();
 $this->_ole =& $t;

Original comment by nimdraug...@gmail.com on 31 Mar 2011 at 11:22

GoogleCodeExporter commented 9 years ago
Warning message E_STRICT Under PHP 5.3.x telling you that "Assigning the return 
value of new by reference is deprecated" can safely replaced with the 
following, where & has been removed:
$this->_ole = new OLERead();

In some cases(at least in recursive loops while creating a tree of nodes 
containing child nodes) requires unset($this->_ole); before the actual object 
assignment line to avoid all child nodes becoming identical.
which is not the case here as its in class contractor which will be called once.

Original comment by ishtiaq....@gmail.com on 17 May 2011 at 10:14

GoogleCodeExporter commented 9 years ago
Use the Comment 2 by nimdraug...@gmail.com ! it Works !

reach @ studybe.blogspot.com

Original comment by kmadhuge...@gmail.com on 31 Jan 2012 at 10:42

GoogleCodeExporter commented 9 years ago
Perfect! Tks

Original comment by christia...@gmail.com on 3 Dec 2012 at 2:56

GoogleCodeExporter commented 9 years ago
nimdraug...@gmail.com, tks for you. It's work

Original comment by caturteg...@gmail.com on 6 Jan 2013 at 1:02

GoogleCodeExporter commented 9 years ago
Thanks it worked!

Original comment by sampathk...@gmail.com on 16 Jan 2013 at 2:34

GoogleCodeExporter commented 9 years ago
@nimdraug@gmail.com

Thanks it works for me

Original comment by amahri...@gmail.com on 13 May 2013 at 6:32

GoogleCodeExporter commented 9 years ago
thanks it works

Original comment by nancymur...@gmail.com on 31 Jul 2013 at 10:34

GoogleCodeExporter commented 9 years ago
#2 nimdraug works

Original comment by igor.cam...@gmail.com on 8 Nov 2014 at 7:46

GoogleCodeExporter commented 9 years ago
Thanks

Original comment by cheeze...@gmail.com on 18 Nov 2014 at 2:18