dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59cd7e3
)
Merge r81718 from 1.17wmf1
author
Tim Starling
<tstarling@users.mediawiki.org>
Tue, 8 Feb 2011 12:08:21 +0000
(12:08 +0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Tue, 8 Feb 2011 12:08:21 +0000
(12:08 +0000)
includes/GlobalFunctions.php
patch
|
blob
|
history
diff --git
a/includes/GlobalFunctions.php
b/includes/GlobalFunctions.php
index
66cf877
..
71847cc
100644
(file)
--- a/
includes/GlobalFunctions.php
+++ b/
includes/GlobalFunctions.php
@@
-301,12
+301,21
@@
function wfErrorLog( $text, $file ) {
} else {
throw new MWException( __METHOD__ . ': Invalid UDP specification' );
}
+
// Clean it up for the multiplexer
if ( strval( $prefix ) !== '' ) {
$text = preg_replace( '/^/m', $prefix . ' ', $text );
+
+ // Limit to 64KB
+ if ( strlen( $text ) > 65534 ) {
+ $text = substr( $text, 0, 65534 );
+ }
+
if ( substr( $text, -1 ) != "\n" ) {
$text .= "\n";
}
+ } elseif ( strlen( $text ) > 65535 ) {
+ $text = substr( $text, 0, 65535 );
}
$sock = socket_create( $domain, SOCK_DGRAM, SOL_UDP );