https://bugzilla.wikimedia.org/show_bug.cgi?id=43594

--- Comment #6 from Mark Clements (HappyDog) <[email protected]> ---
Here's one concrete example, which is where I noticed the issue.  I'm sure it
is not the only situation that it will occur in.

I have an extension (WikiDB) that is compatible with older versions of
MediaWiki, including MW1.6 which runs on PHP4.  I have existing users who still
use PHP4 and for whatever reason are unwilling/unable to upgrade, and I still
support those users, from a single code-base.

The biggest issue with E_STRICT is that it throws a warning if you make a
static call to a function which doesn't have the static keyword.  However, in
order to be compatible with PHP4, we need to omit it.  There are no ill-effects
by doing this in PHP5, except the annoying warnings.

Users of WikiDB are instructed to disable E_STRICT via a call to
error_reporting() in their LocalSettings.php, so the code works without these
messages being output.  However if there are any places in code which suppress
warnings, E_STRICT is temporarily re-enabled.  This manifests in PHP notices in
the search box, for example.

Even if the MW code-base is clean, this is something that is likely to occur in
extensions, and if warnings are being suppressed, then they should be - well -
suppressed.

On a more general note, best practice is to disable this kind of error on
production machines, however in PHP 5.4, the deliberate error suppression code
is actually un-suppressing errors!  That seems very broken to me.  At the very
least it should look at whether E_STRICT is currently being reported or not,
and only omit it from the suppression if it is not already suppressed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to