Skip to content
Snippets Groups Projects
Commit ef3da31c authored by Andrew Dolgov's avatar Andrew Dolgov
Browse files

api: force returned timestamps to integer

parent 5a1b1af3
No related branches found
No related tags found
No related merge requests found
...@@ -309,7 +309,7 @@ class API extends Handler { ...@@ -309,7 +309,7 @@ class API extends Handler {
"published" => sql_bool_to_bool($line["published"]), "published" => sql_bool_to_bool($line["published"]),
"comments" => $line["comments"], "comments" => $line["comments"],
"author" => $line["author"], "author" => $line["author"],
"updated" => strtotime($line["updated"]), "updated" => (int) strtotime($line["updated"]),
"content" => $line["cached_content"] != "" ? $line["cached_content"] : $line["content"], "content" => $line["cached_content"] != "" ? $line["cached_content"] : $line["content"],
"feed_id" => $line["feed_id"], "feed_id" => $line["feed_id"],
"attachments" => $attachments "attachments" => $attachments
...@@ -563,7 +563,7 @@ class API extends Handler { ...@@ -563,7 +563,7 @@ class API extends Handler {
"unread" => (int)$unread, "unread" => (int)$unread,
"has_icon" => $has_icon, "has_icon" => $has_icon,
"cat_id" => (int)$line["cat_id"], "cat_id" => (int)$line["cat_id"],
"last_updated" => strtotime($line["last_updated"]), "last_updated" => (int) strtotime($line["last_updated"]),
"order_id" => (int) $line["order_id"], "order_id" => (int) $line["order_id"],
); );
...@@ -604,7 +604,7 @@ class API extends Handler { ...@@ -604,7 +604,7 @@ class API extends Handler {
"unread" => sql_bool_to_bool($line["unread"]), "unread" => sql_bool_to_bool($line["unread"]),
"marked" => sql_bool_to_bool($line["marked"]), "marked" => sql_bool_to_bool($line["marked"]),
"published" => sql_bool_to_bool($line["published"]), "published" => sql_bool_to_bool($line["published"]),
"updated" => strtotime($line["updated"]), "updated" => (int) strtotime($line["updated"]),
"is_updated" => $is_updated, "is_updated" => $is_updated,
"title" => $line["title"], "title" => $line["title"],
"link" => $line["link"], "link" => $line["link"],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment