-
-
Notifications
You must be signed in to change notification settings - Fork 513
Recursive reference in menu object #2071
Copy link
Copy link
Closed
Labels
Description
Expected behavior
The json_encode function should return a JSON encoded string of the menu object.
Actual behavior
The json_encode function returns a boolean with the value false.
The json_last_error function returns a constant with the value JSON_ERROR_RECURSION.
The var_dump function returns a menu property with the value *RECURSION* within every menu item.
Steps to reproduce behavior
json_encode(new Timber\Menu());
What version of WordPress, PHP and Timber are you using?
WordPress 5.2.3, PHP 7.2.9, Timber 1.11.0
How did you install Timber? (for example, from GitHub, Composer/Packagist, WP.org?)
WordPress plugin repository.
Reactions are currently unavailable