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
[BUG] Fatal error: Uncaught Error: Typed property Timber\Post::$wp_object must not be accessed before initialization in /timber/timber/src/Post.php on line 297
#2955
Closed
pratik-londhe4 opened this issue
Mar 19, 2024
· 2 comments
Expected Behavior
No error should come and page should loadthe
Actual behavior
Fatal error is coming
Steps to reproduce behavior
Here is the code I am using that is causing the issue :
Notes
call stack :
this can be solved by assigning null to the
$wp_object
in Post.phptimber/src/Post.php
Line 60 in 5785128
protected ?WP_Post $wp_object = null;
I found this reference for the solution: https://stackoverflow.com/questions/59265625/why-i-am-suddenly-getting-a-typed-property-must-not-be-accessed-before-initiali
What version of Timber are you using?
2
What version of WordPress are you using?
6.3.3
What version of PHP are you using?
8.1
How did you install Timber?
Installed or updated Timber through Composer
The text was updated successfully, but these errors were encountered: