Mercurial > hg > isophonics-drupal-site
comparison core/lib/Drupal/Core/Queue/DatabaseQueue.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 4c8ae668cc8c |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
98 /** | 98 /** |
99 * {@inheritdoc} | 99 * {@inheritdoc} |
100 */ | 100 */ |
101 public function numberOfItems() { | 101 public function numberOfItems() { |
102 try { | 102 try { |
103 return $this->connection->query('SELECT COUNT(item_id) FROM {' . static::TABLE_NAME . '} WHERE name = :name', [':name' => $this->name]) | 103 return (int) $this->connection->query('SELECT COUNT(item_id) FROM {' . static::TABLE_NAME . '} WHERE name = :name', [':name' => $this->name]) |
104 ->fetchField(); | 104 ->fetchField(); |
105 } | 105 } |
106 catch (\Exception $e) { | 106 catch (\Exception $e) { |
107 $this->catchException($e); | 107 $this->catchException($e); |
108 // If there is no table there cannot be any items. | 108 // If there is no table there cannot be any items. |