mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-12-18 19:12:16 +00:00
Replace unneeded isset()
with !== null
The PHP `global` statement actually creates a global variable if it does not exist yet, setting it to null. Who'd have thunk. This is reported as a new issue type 'MediaWikiNoIssetIfDefined' by mediawiki/mediawiki-phan-config to 0.15.0. Change-Id: Ia1c3a08f399257ede41920beafa9f1864206c94e
This commit is contained in:
parent
cfdd9b1a48
commit
5c9389db15
|
@ -493,10 +493,10 @@ class EventDispatcher {
|
|||
global $wgDTSchemaEditAttemptStepSamplingRate, $wgWMESchemaEditAttemptStepSamplingRate;
|
||||
// Sample 6.25%
|
||||
$samplingRate = 0.0625;
|
||||
if ( isset( $wgDTSchemaEditAttemptStepSamplingRate ) ) {
|
||||
if ( $wgDTSchemaEditAttemptStepSamplingRate !== null ) {
|
||||
$samplingRate = $wgDTSchemaEditAttemptStepSamplingRate;
|
||||
}
|
||||
if ( isset( $wgWMESchemaEditAttemptStepSamplingRate ) ) {
|
||||
if ( $wgWMESchemaEditAttemptStepSamplingRate !== null ) {
|
||||
$samplingRate = $wgWMESchemaEditAttemptStepSamplingRate;
|
||||
}
|
||||
if ( $samplingRate === 0 ) {
|
||||
|
|
Loading…
Reference in a new issue