From: Timo Tijhof Date: Wed, 18 Sep 2013 04:34:32 +0000 (+0200) Subject: RefreshLinksJob: Replace use of empty() with explicit check X-Git-Tag: 1.31.0-rc.0~18740^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_supprimer.php?a=commitdiff_plain;h=8465d05887e1b8b3f8b35305018bce8d754c06b3;p=lhc%2Fweb%2Fwiklou.git 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 --- 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'] ); }