-
Notifications
You must be signed in to change notification settings - Fork 125
Fixes PHP notices (#383) and improve detects of backend request #384
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
Conversation
I've created function Second issue which is connected with this topic is executing wp-cron.php using php-cli. There aren't apache environment variables (more info on #383 ) and it triggers some PHP warnings/notices. I made custom shell script which emulate those variables and I'll try to make it public. For now, based on my experience, I tried to add emulate |
Looks great apart from using get_option() in wp-cache-base.php as I think that will produce a fatal error, but I haven't tested that yet. There's a lot here though, and I want to get 1.5.6 out soon with some minor fixes to the REST API so I'll hold off on this until the release after. Thanks! |
Thanks for review! |
Thanks for commenting out the get_option() part. It might be simpler to disable caching if HTTP_HOST isn't set, because it's not clear where the cache files will go, or come from. That should probably be in a new PR, just for that. |
Some people run cron job via shell script and my primary concern is preload process - some functions use Also, all warnings/errors (which I've analyzed) are coming from wp-cron.php which is already excluded from caching. |
I've done more checking related to
I think that's acceptable for now. |
Damn, I left this too long and moving all the functions out of wp-cache-phase1.php has broken this PR. |
I just tried to fix conflicts, but it seems that's easier to create totally new PR. I'll try to do it in next couple hours. |
wpsc_is_backend
get_current_url_supercache_dir
by using regular expressions$WPSC_HTTP_HOST