Ticket: #2517 (review)
We currently return false in the object factories when no object could be created. Two examples for posts:
We should change this to return null, because
- Being able to use the null coalescing operator on
Timber\Timber::get_post() is a big plus.
- WordPress’s
get_post() function also returns null if no post can be found.
This does not only apply to posts, but also other factories.
Ticket: #2517 (review)
We currently return
falsein the object factories when no object could be created. Two examples for posts:Timber\Factory\PostFactory::from()Timber\Timber::get_post()We should change this to return
null, becauseTimber\Timber::get_post()is a big plus.get_post()function also returnsnullif no post can be found.This does not only apply to posts, but also other factories.