Change the return type from the lastInsertId() method

This commit is contained in:
Visman 2020-09-12 10:21:03 +07:00
parent 6cefed419e
commit 17a55c4aa1
7 changed files with 7 additions and 7 deletions
app/Models

View file

@ -95,7 +95,7 @@ class Manager extends ManagerModel
VALUES (?s:name, ?i:position)';
$this->c->DB->exec($query, $vars);
$cid = $this->c->DB->lastInsertId();
$cid = (int) $this->c->DB->lastInsertId();
parent::set($cid, ['cat_name' => $name, 'disp_position' => $pos]);
return $cid;

View file

@ -102,7 +102,7 @@ class Save extends Action
VALUES (' . \implode(', ', $set2) . ')';
$this->c->DB->exec($query, $vars);
$forum->id = $this->c->DB->lastInsertId();
$forum->id = (int) $this->c->DB->lastInsertId();
$forum->resModified();
return $forum->id;

View file

@ -86,7 +86,7 @@ class Save extends Action
VALUES ({$set2})";
$this->c->DB->exec($query, $vars);
$group->g_id = $this->c->DB->lastInsertId();
$group->g_id = (int) $this->c->DB->lastInsertId();
$group->resModified();
return $group->g_id;

View file

@ -86,7 +86,7 @@ class Save extends Action
VALUES ({$set2})";
$this->c->DB->exec($query, $vars);
$post->id = $this->c->DB->lastInsertId();
$post->id = (int) $this->c->DB->lastInsertId();
$post->resModified();
return $post->id;

View file

@ -89,7 +89,7 @@ class Save extends Action
VALUES ({$set2})";
$this->c->DB->exec($query, $vars);
$report->id = $this->c->DB->lastInsertId();
$report->id = (int) $this->c->DB->lastInsertId();
$report->resModified();
$this->c->Cache->set('report', $report->id);

View file

@ -86,7 +86,7 @@ class Save extends Action
VALUES ({$set2})";
$this->c->DB->exec($query, $vars);
$topic->id = $this->c->DB->lastInsertId();
$topic->id = (int) $this->c->DB->lastInsertId();
$topic->resModified();
return $topic->id;

View file

@ -113,7 +113,7 @@ class Save extends Action
VALUES ({$set2})";
$this->c->DB->exec($query, $vars);
$user->id = $this->c->DB->lastInsertId();
$user->id = (int) $this->c->DB->lastInsertId();
$user->resModified();
if ($user->isAdmin) {