Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.8.0

Bug #14560 yields warnings from E_STRICT
Submitted: 2008-08-25 14:01 UTC
From: thijs Assigned: stoyan
Status: Closed Package: Text_Highlighter (version 0.7.1)
PHP Version: 5.2.0 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2008-08-25 14:01 UTC] thijs (Thijs Kinkhorst)
Description: ------------ When turning on E_STRICT in PHP5 I get these warnings. Could you look into that please? Thanks! Strict Standards: Assigning the return value of new by reference is deprecated in Text/Highlighter.php on line 210 Strict Standards: Assigning the return value of new by reference is deprecated in Text/Highlighter.php on line 364 Strict Standards: Redefining already defined constructor for class Text_Highlighter_Renderer in Text/Highlighter/Renderer.php on line 73

Comments

 [2008-08-25 18:02 UTC] stoyan (Stoyan Stefanov)
thanks, I'll take a look at these
 [2009-04-28 10:24 UTC] johan (Johan Persson)
The problem with the assign by reference is a pure PHP4:ism and is not compatible with PHP5 this is due to the changed object semantics in PHP5. This can unfortunately only be solved by having two different sets of codes; one for PHP4 and one for PHP5 if it should run clean under E_STRICT. For the "already defined constructor problem" this problem stems from the compatibility "hack" of keeping a PHP4 style constructor in parallel with the modern PHP5 style of constructors (i.e. __constructor() ) Unfortunately fixing this means again to split the code in one PHP4 and one PHP5 branch and use some conditional includes. As for my self (since I converted 100% to PHP5) I simply removed all "assign new by reference" (since this is guaranteed to work semantically the same in PHP5) and commented out the PHP4 compatibility constructors.
 [2010-03-08 18:57 UTC] doconnor (Daniel O'Connor)
-Status: Assigned +Status: Closed
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.