Most snippets fail with “Cannot use temporary expression in write context”
-
Recently this plugin started showing this error for random snippets:
Cannot use temporary expression in write context
The error occurred on line 17 of this snippet’s code (highlighted below).
Please note that it is always the same “…on line 17” error, it doesn’t have anything to do with the context of the code, it will show “on line 17” even if there are fewer than 17 lines.
A good sign that this is being shown incorrectly is that it shown for the “Completely Disable Comments” snippet offered by the plugin.
WP code version: 2.1.12
WordPress version: 6.5.3
php version: 8.2.16
The topic ‘Most snippets fail with “Cannot use temporary expression in write context”’ is closed to new replies.