Last modified: 2014-01-06 09:37:21 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T45092, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 43092 - Warn if error_reporting has E_STRICT
Warn if error_reporting has E_STRICT
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
1.21.x
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
http://www.mediawiki.org/wiki/Thread:...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-13 21:07 UTC by Jesús Martínez Novo (Ciencia Al Poder)
Modified: 2014-01-06 09:37 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---
federicoleva: Backport_to_Stable+


Attachments

Description Jesús Martínez Novo (Ciencia Al Poder) 2012-12-13 21:07:20 UTC
I have experienced already several reports of people in mediawiki.org's Project:Support_desk and extensions talk pages about getting weird "Strict Standards" errors.

One of those errors is:

 Strict Standards: date_default_timezone_get(): It is not safe to rely on the system's timezone settings

This happens because since PHP >= 5.4.0, E_STRICT became part of E_ALL in error_reporting, and seeing how many people are asking for help about this (in general, not only for MediaWiki) on internet makes me think it's a common environment on many systems.

Having a check on the installer to detect this configuration and issue a warning like "Your PHP configuration includes E_STRICT in error_reporting. This is not a recommended setting for production environments" should help people to early-identify this problem.

On an ideal world, MediaWiki shouldn't issue a E_STRICT under any circumstance. But it seems it's not always possible (being the date_default_timezone_get() an example because of a misconfigured PHP), and some extensions may issue some of them also.
Comment 1 Bawolff (Brian Wolff) 2012-12-13 23:19:07 UTC
I disagree that we should warn users about E_STRICT. (That said its probably not a good idea on a production machine, but I don't think we should be telling people how to run their servers warning wise).


Real issue here is that since php 5.4 E_STRICT is included in E_ALL. Thus we weren't suppressing the warning like we used to. I submitted a patch for that ( Gerrit change #38650 )

That's not what the request is though, so i'm unsure if I should put patch-in-gerrit keyword.
Comment 2 Bawolff (Brian Wolff) 2012-12-19 00:03:50 UTC
> 
> Real issue here is that since php 5.4 E_STRICT is included in E_ALL. Thus we
> weren't suppressing the warning like we used to. I submitted a patch for
> that (
> Gerrit change #38650 )
>

That was merged now, so the strict standards error will no longer appear for folks (at least the date_timezone_get one). Leaving this bug open because that was not really what was requested.
Comment 3 Jesús Martínez Novo (Ciencia Al Poder) 2013-01-02 21:37:08 UTC
I think the solution provided is pretty much sufficient. Thanks!

Somebody else reported bug 43594 for your same solution.
Comment 4 Mark Clements (HappyDog) 2013-01-02 22:21:51 UTC
Can this be back-ported to the 1.19 branch?
Comment 5 Bawolff (Brian Wolff) 2013-01-15 23:03:41 UTC
(In reply to comment #4)
> Can this be back-ported to the 1.19 branch?

Sorry, this bug totally slipped my mind.

I'm new to this backporting thing. Gerrit change #44166 is my attempt to do so.
Comment 6 Bawolff (Brian Wolff) 2013-03-13 00:55:17 UTC
Sorry for delay. The fix will be present in 1.19.5 whenever that gets released. If you download the REL1_19 branch from git, it will also have the fix.
Comment 7 Nemo 2013-03-13 09:37:06 UTC
(In reply to comment #6)
> Sorry for delay. The fix will be present in 1.19.5 whenever that gets
> released.
> If you download the REL1_19 branch from git, it will also have the fix.

Fix backport status: we're still at 1.19.4, should be set to + once released (per discussion we had).
Comment 8 Nemo 2013-04-13 07:01:28 UTC
(In reply to comment #7)
> Fix backport status: we're still at 1.19.4, should be set to + once released
> (per discussion we had).

Well, Krinkle just set to + after backporting, I guess we'll check the pending backports on gerrit instead.
Comment 9 mlpearc 2014-01-06 09:37:21 UTC
I just spent a day and a half trying to resolve this same [https://www.mediawiki.org/wiki/User:Mlpearc/Sandbox#Timezone_error issue], and after seeing this report of it being fixed, I guess my LocalSettings.php config's are still messed up ?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links