When a logging service other than MWLoggerLegacySpi is used, the
behavior of wfErrorLog is not guaranteed.
Change-Id: I8543bfd556aa752665f7a3daa855d3c2f7fc8956
Notice: Undefined index: line in
/var/www/wiki/includes/GlobalFunctions.php on line 1840
Caused by fc2e6df64f, previous versions
used isset here.
Change-Id: Ie9434f09e0905346ace19909fb316d47c75e0440
* It will also no longer call getReaderIndex( false, ... ) twice
* Removed various related ampersands
Change-Id: Ia79e2007dbf84e7437f9439aa6371333aa3e1b23
* Add optional $context parameter to wfDebug, wfDebugLog, wfLogDBError
and wfErrorLog that will be passed to MWLogger.
* Add support for PSR-3 style log message parameter interpolation in
MWLoggerLegacyLogger.
* Add context information to wfLogDBError calls made from DatabaseBase,
DatabaseMysqlBase and LoadBalancer instances.
* Deprecate wfDebugTimer() which now appears to be unused.
Change-Id: Ic90d593d00a2b0b5b80ed205908cbe624042603c
Make the profiler logging output introduced in Iae11e1e a little nicer.
Stop adding the Profiler::getRawData() information and add the URL and
textual report to the default log message. When testing with a Monolog
logger and Logstash the getRawData output from the Xhprof profiler was
found to be too big to be usable. The default message output was found
to be less informative than desirable when a PSR-3 logger other than
MWLoggerLegacyLogger was used. MWLoggerLegacyLogger implements special
backwards compatible formatting for the profileoutput channel that will
not be effected by this change.
Change-Id: Id326aed4f72a3489fac30661c101ac3bb3af2530
- Changed spaces to tabs for indentation
- space after 'function'/'if'
- Added/Removed space after parenthesis/brackets/end of line
- Removed space after cast
Change-Id: I0e8e6a19b84b5e1308b632a0266cb78f688494ee
Output structured profiling report data from wfLogProfilingData using
MWLogger.
Requires Ie667944, I5c82299, and I1e5596d.
Change-Id: Iae11e1e4fe970ada74136f0e969dc624c586ce17
Send wfDebug, wfDebugLog, wfLogDBError and wfLogDBError log messages to
the new MWLogger PSR-3 logger subsystem. Compatibility with the historic
logging operations of wfLogDBError are provided by MWLoggerLegacyLogger
and the MWLoggerLegacySpi logger factory.
Requires the MWLogger system introduced in I5c82299 and the Composer
managed libraries from Ie667944.
Change-Id: I1e5596d590144fbfdfd5f18bc42cf1ef0dbcac12
Per Tim Starling's review of Icb239471, reverted back to the version of
the function from Patch Set 1 of Iece006ec, which did not have the bug.
This version does not attempt to minimize the inevitable leakage of the
string's length.
Also revised the doc comment to explain more effectively what the problem
with a normal (===) string comparison is for the use cases of this function.
Follows-up b9e1d5f5c0.
Change-Id: I1b347e69b39af3d7d8ba6673af63f1a616befbdf
The replace of $n params can also be done using the Message class. In
case there are no message keys, the RawMessage class is used.
Deprecated wfMsgReplaceArgs, but added no warning, because it is used in
some extensions and from deprecated functions
Change-Id: I62091b09e4490e59ed7258566e0ddf2f8ee799d2
* Do not block forever, but wait up to 10 seconds. Likewise,
check the lag times in memcached on startup. This at least
lets runners avoid lagged wikis but still work on others.
* Made a few small related documentation and code cleanups.
Change-Id: Ic1339bab54cba6b6cbea7d97a80ff87c7c5c87af
The Message class constructor has long supported passing an array of
keys for fallback messages, and wfMessage passes the $keys parameter
through unchanged.
And since this is already in use in core, we may as well document it.
Change-Id: I8f7f9ade87e855300650b2e7e31b9303daa96ac5
Before php/php-src@834daa455b, PHP's gmp_init() function would try
to autodetect hex and binary numbers even when a base was explicitly
specified[1], so the results for some base-36 numbers having leading
zeros could be incorrect. Work around this bug by trimming off any
leading zeros before calling gmp_init().
[1]: https://bugs.php.net/bug.php?id=50175
Bug: 69249
Change-Id: I5f5458c1a1195f55fa12904c103da6ea7558010a
* All maintenance scripts pretty much assumed this behavior, but it
was not actually the case. This can avoid some massive lag problems.
Change-Id: I5894409d6abade16afd8144f6689c2aff3fa7327
- Swap "$variable type" to "type $variable"
- Added missing types
- Fixed spacing inside docs
- Makes beginning of @param/@return/@var/@throws in capital
- Changed some types to match the more common spelling
Change-Id: I783e4dbfe5f6f98b32b9a03ccf6439e13e132bcc
- Removed spaces after not operator (!)
- Removed spaces inside array index
- use tab as indent instead of spaces
- Add newline at end of file
- Removed spaces after casts
Change-Id: I9ba17c4385fcb43d38998d45f89cf42952bc791b
Command line may now be given as an array, where each value
will be escaped and glued together with a space.
Change-Id: I9237ec1fccc60c0c4a360562db1c050a3be7e6a3
Especially when executing commands that return a relatively lot of data in stdout
quickly, proc_get_status() may return that command has terminated before everything
has been read from pipes. Handle this case by continuing to perform
non-blocking select on the process's streams until all remaining data has been
read.
Bug: 67870
Change-Id: I050292dbb76821f66a15f937bf3aaf4defe67687
The iconv fallback is, for the most part, a remnant of PHP 4 support.
Though iconv was not enabled by default in PHP 4, it is in PHP 5. This
is the case even for Windows builds, which use GNU libiconv.
As for the major Linux distributions:
* Debian, CentOS, Ubuntu -> always enabled
* Fedora, Slackware -> .so in the same package, enabled by default
* Arch -> .so in the same package, disabled by default
* openSUSE -> separate package
Change-Id: Ie1112a5742646a0e1f951e188480c23851859320
* Made wfWaitForSlaves() use it instead of using isOpen() incorrectly.
The index for the master is 0, not DB_MASTER. This fixes 2979f0b6.
Change-Id: I48e5c7f10d8fe6b8bf6e830282352e3238b5d3ae