From 8465d05887e1b8b3f8b35305018bce8d754c06b3 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Wed, 18 Sep 2013 06:34:32 +0200 Subject: [PATCH] RefreshLinksJob: Replace use of empty() with explicit check Using empty() is a maintenance nightmare as it completely removes any meaning of what the author intends to check for (whether the variable exists at all, it being set to an empty array, 0, '0' etc.) Follows-up I445e10da122e5f24e589 which changed it from isset() to !empty() with commit message of checking for false. Change-Id: I561f03b0526685f51138d723f9eb7196725e0b93 --- includes/job/jobs/RefreshLinksJob.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/job/jobs/RefreshLinksJob.php b/includes/job/jobs/RefreshLinksJob.php index 474212b44b..4fc8bac623 100644 --- a/includes/job/jobs/RefreshLinksJob.php +++ b/includes/job/jobs/RefreshLinksJob.php @@ -48,7 +48,7 @@ class RefreshLinksJob extends Job { # Wait for the DB of the current/next slave DB handle to catch up to the master. # This way, we get the correct page_latest for templates or files that just changed # milliseconds ago, having triggered this job to begin with. - if ( !empty( $this->params['masterPos'] ) ) { + if ( isset( $this->params['masterPos'] ) && $this->params['masterPos'] !== false ) { wfGetLB()->waitFor( $this->params['masterPos'] ); } -- 2.20.1