X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fdeferred%2FSiteStatsUpdate.php;h=7cb2950942cb16d8c0acd603df89bd4794fd94cb;hb=52b74d44d522c2a1b67f9ccc2b8f7e44b6b52d7c;hp=79aab7d099dbb4c1f5b8094f734b99e2b1708e62;hpb=3c198b9dc85654bddf4bf7ad8875339151bc15c1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/deferred/SiteStatsUpdate.php b/includes/deferred/SiteStatsUpdate.php index 79aab7d099..7cb2950942 100644 --- a/includes/deferred/SiteStatsUpdate.php +++ b/includes/deferred/SiteStatsUpdate.php @@ -66,6 +66,12 @@ class SiteStatsUpdate implements DeferrableUpdate, MergeableUpdate { public static function factory( array $deltas ) { $update = new self( 0, 0, 0 ); + foreach ( $deltas as $name => $unused ) { + if ( !in_array( $name, self::$counters ) ) { // T187585 + throw new UnexpectedValueException( __METHOD__ . ": no field called '$name'" ); + } + } + foreach ( self::$counters as $field ) { if ( isset( $deltas[$field] ) && $deltas[$field] ) { $update->$field = $deltas[$field];