Re: PEAR-wide code quality issue (fix proposal for possible class redeclare errors)

From: Date: Sun, 16 Jul 2006 02:36:42 +0000
Subject: Re: PEAR-wide code quality issue (fix proposal for possible class redeclare errors)
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-43488@lists.php.net to get a copy of this message
On 7/15/06, Pierre <pierre.php@gmail.com> wrote:
On 7/15/06, peter fiksman <pfiksman@gmx.net> wrote: Hello all, hearing all those irritated voices I still dare to ask... why can't be ALL classes defined like: ================================ if ( !class_exists( "SOME_Package_And_Class_Name" ) ) { class SOME_Package_And_Class_Name { // code } } ================================ I have got some "cannot redeclare" issues with autoloading classes and this was a really helpful fix (to PEAR classes...) If this is not dangerous at all (or is it?) maybe it could be possible to patch PEAR classes in this way. Just preventing the redeclare fatal error? use require/include_once
http://pear.reversefold.com/dokuwiki/doku.php?id=phpfaqs#why_does_my_script_get_included_multiple_times_with_include_once_require_once -- Justin Patrin

« previous php.pear.dev (#43488) next »