Skip to content

Commit

Permalink
fix: allow negative integers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Thulin committed Dec 8, 2023
1 parent 9b098bf commit f456376
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Api/Pdf/PdfIdEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private function getPostsById(array $ids) {
$postTypes = [];
if (!empty($ids) && is_array($ids)) {
foreach ($ids as $id) {
$id = absint(trim($id));
$id = trim($id);
$post = get_post($id);
if (!empty($post->post_status) && $post->post_status == 'publish') {
$post = \Municipio\Helper\Post::preparePostObject($post);
Expand Down

0 comments on commit f456376

Please sign in to comment.