final public function batchPush( array $jobs, $flags = 0 ) {
$this->assertNotReadOnly();
- if ( !count( $jobs ) ) {
+ if ( $jobs === [] ) {
return; // nothing to do
}
global $wgJobClasses;
$this->assertNotReadOnly();
- if ( !WikiMap::isCurrentWikiDomain( $this->domain ) ) {
+ if ( !WikiMap::isCurrentWikiDbDomain( $this->domain ) ) {
throw new MWException(
"Cannot pop '{$this->type}' job off foreign '{$this->domain}' wiki queue." );
} elseif ( !isset( $wgJobClasses[$this->type] ) ) {