You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using get_posts with array like this : {% for item in get_posts( [ 1503, 543, 3220 ] ) %}, Timber display posts and ignore if the ID doesn't exists.
Actual behavior
Fatal error if an ID doesn't exists:
Fatal error: Uncaught Error: Call to a member function setup() on null in /Users/g/Sites/g/vendor/timber/timber/src/PostsIterator.php:49 Stack trace: #0 /Users/g/Sites/g/vendor/twig/twig/src/Environment.php(361) : eval()'d code(105): Timber\PostsIterator->current() #1
Steps to reproduce behavior
Loop with an array width get_posts with a wrong ID.
Notes
No response
What version of Timber are you using?
2.0.0
What version of WordPress are you using?
6.4.1
What version of PHP are you using?
8.1.13
How did you install Timber?
Installed or updated Timber through Composer
The text was updated successfully, but these errors were encountered:
Expected Behavior
When using get_posts with array like this :
{% for item in get_posts( [ 1503, 543, 3220 ] ) %}
, Timber display posts and ignore if the ID doesn't exists.Actual behavior
Fatal error if an ID doesn't exists:
Fatal error: Uncaught Error: Call to a member function setup() on null in /Users/g/Sites/g/vendor/timber/timber/src/PostsIterator.php:49 Stack trace: #0 /Users/g/Sites/g/vendor/twig/twig/src/Environment.php(361) : eval()'d code(105): Timber\PostsIterator->current() #1
Steps to reproduce behavior
Loop with an array width
get_posts
with a wrong ID.Notes
No response
What version of Timber are you using?
2.0.0
What version of WordPress are you using?
6.4.1
What version of PHP are you using?
8.1.13
How did you install Timber?
Installed or updated Timber through Composer
The text was updated successfully, but these errors were encountered: