PluginProbe
Import WP – CSV & XML Import Export for WordPress / 2.15.0
Import WP – CSV & XML Import Export for WordPress v2.15.0
2.15.1 2.15.0 2.14.24 2.14.23 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.9.0 2.9.1 All 144 releases
← All changes | class/Common/Importer/Config/Config.php +15 -2 2.14.24 → 2.15.0 View file →
@@ -187,9 +187,18 @@
187 187 }
188 188
189 189 public function readIndexes($key)
190 190 {
191 - return $this->hasIndexed($key);
191 + if (!$this->hasIndexed($key)) {
192 + return false;
193 + }
194 +
195 + // Treat a zero-record index as missing so it can be rebuilt
196 + if (!isset($this->config['count'][$key]) || intval($this->config['count'][$key]) < 1) {
197 + return false;
198 + }
199 +
200 + return true;
192 201 }
193 202
194 203 public function storeIndexes($key, $buffer = false)
195 204 {
@@ -233,9 +242,13 @@
233 242 }
234 243
235 244 public function getRecordCount($key)
236 245 {
237 - return $this->config['count'][$key];
246 + if (!isset($this->config['count'][$key])) {
247 + return 0;
248 + }
249 +
250 + return intval($this->config['count'][$key]);
238 251 }
239 252
240 253 public function getIndexFile($key)
241 254 {