Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI user-info fixes #2292

Merged
merged 2 commits into from Mar 23, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -187,9 +187,17 @@ public function listTags($precounts = false) {
public function count() {
$sql = 'SELECT COUNT(*) AS count FROM `' . $this->prefix . 'tag`';
$stm = $this->bd->prepare($sql);
$stm->execute();
$res = $stm->fetchAll(PDO::FETCH_ASSOC);
return $res[0]['count'];
if ($stm && $stm->execute()) {
$res = $stm->fetchAll(PDO::FETCH_ASSOC);
return $res[0]['count'];
} else {
$info = $stm == null ? array(0 => '', 1 => '', 2 => 'syntax error') : $stm->errorInfo();
if ($this->autoUpdateDb($info)) {
return $this->count();
}
Minz_Log::error('SQL error TagDAO::count: ' . $info[2]);
return false;
}
}
public function countEntries($id) {
@@ -13,3 +13,5 @@
foreach ($users as $user) {
echo $user, "\n";
}
done();
@@ -51,3 +51,5 @@
"\n";
}
}
done();
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.