Re: Question about PEAR::getStaticProperty()
| From: | Helgi Þormar Þorbjörnsson | Date: | Fri, 19 Dec 2008 21:02:43 +0000 |
| Subject: | Re: Question about PEAR::getStaticProperty() | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-51339@lists.php.net to get a copy of this message | ||
On Fri, Dec 19, 2008 at 8:04 PM, Craig Constantine <cconstantine@php.net> wrote:
>
> Hi all...
>
> I'm running php 5 with E_STRICT (yeah, here we go.... :) The MIME_Type
> package has an early line of code (line 23 in MIME/Type.php)...
>
> $_fileCmd = &PEAR::getStaticProperty('MIME_Type', 'fileCmd');
>
> I'm wondering if I should open a feature request with code patch for
> MIME_Type to make that into...
>
> if (PEAR_ZE2) {
> $_fileCmd = PEAR5::getStaticProperty('MIME_Type', 'fileCmd');
> }
> else {
> $_fileCmd = &PEAR::getStaticProperty('MIME_Type', 'fileCmd');
> }
Well I didn't make that PEAR5 class for that reason :-)
The pear installer had a getStaticProperty call in the __destruct and
that couldn't be silenced with no other means.
But yeah I guess you could do that if you want to.
- Helgi