[Tickets #2788] Errors in code

bugs@bugs.horde.org bugs at bugs.horde.org
Fri Oct 14 14:41:36 PDT 2005


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: https://dev.horde.org/horde/whups/ticket/?id=2788
-----------------------------------------------------------------------
 Ticket             | 2788
 Updated By         | tomas_matousek at hotmail.com
 Summary            | Errors in code
 Queue              | Horde Base
 Version            | HEAD
 State              | Assigned
 Priority           | 1. Low
 Type               | Bug
 Owners             | 
-----------------------------------------------------------------------


tomas_matousek at hotmail.com (2005-10-14 14:41) wrote:

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





More information about the bugs mailing list