[#2788] Errors in code
Summary Errors in code
Queue Horde Base
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners Horde Developers
Requester tomas_matousek (at) hotmail (dot) com
Created 10/14/2005 (1182 days ago)
Due
Updated 10/17/2005 (1179 days ago)
Assigned 10/14/2005 (1182 days ago)
Resolved 10/16/2005 (1180 days ago)
Attachments
Milestone
Patch No

History
10/17/2005 tomas_matousek (at) hotmail (dot) com Comment #5 Reply to this comment
You are right, we will fix it in our compiler. Thanks.
10/16/2005 Chuck Hagenbuch Comment #4
State ⇒ Resolved
Reply to this comment
C:\Web\Horde\lib\Text\Diff\Renderer\inline.php(123,22): warning:
Class 'Text_Diff_Renderer_inline' has no constructor defined
This one is bogus - constructors can be inherited by subclasses and 
there is a perfectly valid parent class constructor.

The rest have been fixed.
10/15/2005 Jan Schneider Assigned to Horde DevelopersHorde Developers
 
10/14/2005 tomas_matousek (at) hotmail (dot) com Comment #3 Reply to this comment
Are the missing ctor warnings really a problem?  I'm working on the
other warnings.
Well, warnings give an information that you may forget about something 
but they don't mean the code cannot work well. In these particular 
cases, the new operator takes some parameters and hence one would 
expect there will be a constructor consuming these parameters. For 
example, there is no ctor defined on Horde_Cache but there is the 
following code around line 121 in Cache.php:

         if (empty($driver) || $driver == 'none') {
             return $cache = &new Horde_Cache($params);
         }

I'm not familiar with your code in details so I don't know the intents 
behind. I can only suggest to add ctors at least to make clear to 
developers extending the class that there can be a parameter used when 
instantiating it.

10/14/2005 Matt Selsky Comment #2
State ⇒ Assigned
Reply to this comment
Are the missing ctor warnings really a problem?  I'm working on the 
other warnings.
10/14/2005 tomas_matousek (at) hotmail (dot) com Comment #1
State ⇒ Unconfirmed
Type ⇒ Bug
Queue ⇒ Horde Base
Priority ⇒ 1. Low
Summary ⇒ Errors in code
Reply to this comment
During testing of the latest release of our PHP compiler (Phalanger, 
php-compiler.net) we have found following bugs in your code. We 
strongly believe these are bugs in the code and not in the compiler. 
However, if that wasn't the case, please report me back. Thanks.

C:\Web\Horde\lib\Horde\Auth.php(275,45): warning: Library function 
'implode' called with wrong number of parameters
C:\Web\Horde\lib\Horde\Cache.php(121,30): warning: Class 'Horde_Cache' 
has no constructor defined
C:\Web\Horde\lib\Horde\Editor.php(43,31): warning: Class 
'Horde_Editor' has no constructor defined
C:\Web\Horde\lib\Horde\History.php(100,25): warning: Class 
'DataTreeObject_History' has no constructor defined
C:\Web\Horde\lib\Horde\History.php(323,21): warning: Class 
'DataTreeObject_History' has no constructor defined
C:\Web\Horde\lib\Horde\Token.php(138,30): warning: Class 'Horde_Token' 
has no constructor defined
C:\Web\Horde\lib\Horde\Browser\imode.php(292,9): error: Cannot 
redeclare field Browser_imode::$_extra previously declared on (281,9)
C:\Web\Horde\lib\Horde\MIME\Viewer\richtext.php(76,21): warning: 
Library function 'str_ireplace' called with wrong number of parameters
C:\Web\Horde\lib\Horde\MIME\Viewer\richtext.php(87,21): warning: 
Library function 'str_ireplace' called with wrong number of parameters
C:\Web\Horde\lib\Text\Diff\Renderer\inline.php(123,22): warning: Class 
'Text_Diff_Renderer_inline' has no constructor defined
C:\Web\Horde\lib\Text\reST\Formatter\html.php(92,9): warning: The 
'case' label with value Paragraph has already been declared
C:\Web\Horde\po\translation.php(715,21): error: Cannot break/continue 
3 level(s)