Index: trunk/extensions/ContributionTracking/ContributionTracking.processor.php |
— | — | @@ -269,15 +269,16 @@ |
270 | 270 | * @return array |
271 | 271 | */ |
272 | 272 | static function mergeArrayDefaults( $params, $defaults, $nullify=false ) { |
273 | | - foreach ( $defaults as $key => $value ) { |
| 273 | + $ret = $defaults; |
| 274 | + foreach ( $ret as $key => $value ) { |
274 | 275 | if ( array_key_exists( $key, $params ) ) { |
275 | | - $defaults[$key] = $params[$key]; |
| 276 | + $ret[$key] = $params[$key]; |
276 | 277 | } |
277 | | - if ( $nullify && $defaults[$key] === '' ) { |
278 | | - $defaults[$key] = null; |
| 278 | + if ( $nullify && $ret[$key] === '' ) { |
| 279 | + $ret[$key] = null; |
279 | 280 | } |
280 | 281 | } |
281 | | - return $defaults; |
| 282 | + return $ret; |
282 | 283 | } |
283 | 284 | |
284 | 285 | /** |