-
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Using asset()
helper causes failures when running WP-CLI commands
#263
Comments
Hey @retlehs 👋 Thanks for reporting this! 🙏 I'll look into it this weekend and see about getting a fix implemented! |
Note: Others may also be getting this same error message in a situation that is unrelated to this bug — this is the result of having an outdated |
asset
helper breaks on optimizeasset()
helper causes fatal error after running wp acorn optimize
asset()
helper causes fatal error after running wp acorn optimize
asset()
helper can cause fatal error after running wp acorn optimize
FWIW, the hook used definitely matters, too:
|
Don't know if it's related, but running In ConfigCacheCommand.php line 84:
Your configuration files are not serializable.
In config.php line 336:
Call to undefined method Closure::__set_state()
This also seems to slow down the wp admin significantly. |
That looks to me like there are some closures getting into your config somewhere, which aren't serializable out of the box and should be avoided in your configs. It's also possible that we missed a dependency from Laravel 9 that we need to get in there, such as laravel/serializable-closure. I'll dig into these issues tomorrow. |
asset()
helper can cause fatal error after running wp acorn optimize
asset()
helper causes failures when running WP-CLI commands
This error was caused by my log1x/poet config file. I moved my function to a class like suggested here, and the error is gone! |
Description
The
asset
function works until awp
command is ranSteps To Reproduce
asset()
helper in a PHP file:wp
Actual Behavior
Versions
v3.0.0
The text was updated successfully, but these errors were encountered: