Browse Source

fix post index receiving

main
ghost 3 years ago
parent
commit
22180cb4b3
  1. 5
      src/application/controller/api/post/add.php

5
src/application/controller/api/post/add.php

@ -11,9 +11,8 @@ if (isset($_SESSION['userName'])) { @@ -11,9 +11,8 @@ if (isset($_SESSION['userName'])) {
$postK = 1;
if ($userPosts = $_twister->getPosts([$_SESSION['userName']], 1)) {
if (isset($userPosts[0]['k'])) {
$postK = Filter::int($userPosts[0]['k']) + 1;
if (isset($userPosts[0]['userpost']['k'])) {
$postK = Filter::int($userPosts[0]['userpost']['k']) + 1;
}
}

Loading…
Cancel
Save