PHP 5.3, QCubed and E_STRICT

Login or register to post comments
2 replies [Last post]
OOPMan's picture
Offline
Joined: 11/07/2008

Hey all, it's been a while since I posted.

So, anyways I started testing my current QCodo projects on PHP 5.3, making a few changes to fix things here and there.

However, I can't get over how stupid and persistent E_STRICT is.

At this point I've modified my project such that no fatal errors occur when run on PHP 5.3. However, a huge number of errors of the sort: "Declaration of...should be compatible with..." prevent my application from running.

Now I've tried monkeying with the error_reporting settings in my php.ini but to no avail. No matter what option I specify other than 0 (No reporting) the E_STRICT errors continue to occur.

I found a simple, hacky solution which gets my site working though. In the includes/qcodo/_core/error.inc.php file in the function that handles errors I've told it to return true if it encounters E_STRICT. This gets the site working perfectly so far as I can tell.

The whole "Declaration of...should be compatible with..." error is extremely weird and irritating though.

Specifically, it prevents me from doing things like this:

class MyDialogBox extends QDialogBox
{
public function ShowDialogBox($strText)
{
  $this->strText = $strTex;
}
}

I understand why they added this error, but I think it's extremely stupid and irritating. Maybe it is bad design to change the method signature in descendant classes but if I want to do it I should not be prevented from doing so.

Anyone else have any feelings about this?

Offline
Joined: 03/31/2008

There's a ticket with a patch attached that changes qcubed error reporting to obey php.ini.

Other than that, we don't have any control over PHP. But yes, being able to extend a function with additonal / less parameters just makes sense for inherited objects.

OOPMan's picture
Offline
Joined: 11/07/2008

Thankyou!

For a while I thought I was going nuts, until I finally realised that No, E_STRICT is just bollocks.