X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FrunJobs.php;h=429edf427b7dc0cc7023f2a4bcaf0266e4576702;hb=5c51cb96eaea76d22b9c48928044a942c4be2feb;hp=52f0462a113b3d352d341304ca040103d52bf23d;hpb=281cfea7c3700c6c6b454193fb6409f0fb895a27;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/runJobs.php b/maintenance/runJobs.php index 52f0462a11..429edf427b 100644 --- a/maintenance/runJobs.php +++ b/maintenance/runJobs.php @@ -155,14 +155,14 @@ class RunJobs extends Maintenance { $m = array(); if ( preg_match( '!^(\d+)(k|m|g|)$!i', ini_get( 'memory_limit' ), $m ) ) { list( , $num, $unit ) = $m; - $conv = array( 'g' => 1024*1024*1024, 'm' => 1024*1024, 'k' => 1024, '' => 1 ); + $conv = array( 'g' => 1024 * 1024 * 1024, 'm' => 1024 * 1024, 'k' => 1024, '' => 1 ); $maxBytes = $num * $conv[strtolower( $unit )]; } else { $maxBytes = 0; } } $usedBytes = memory_get_usage(); - if ( $maxBytes && $usedBytes >= .95*$maxBytes ) { + if ( $maxBytes && $usedBytes >= 0.95 * $maxBytes ) { throw new MWException( "Detected excessive memory usage ($usedBytes/$maxBytes)." ); } }