Skip to content

v1.8.4 — Fix "Unexpected server response" on install

Choose a tag to compare

@nonstopmarketing nonstopmarketing released this 17 Jun 06:33
· 1 commit to main since this release

Root cause

WP_Ajax_Upgrader_Skin lives in its own file that WordPress core only loads inside its built-in update AJAX handlers — not for a custom AJAX action like this plugin's. Instantiating it when the class wasn't loaded threw a fatal, producing a 500 with an HTML error body, which the browser couldn't parse → "Unexpected server response."

Fixes

  • Explicitly require_once the skin class file when the class is missing
  • Disable display_errors inside the handler so PHP notices/deprecations can't leak into and corrupt the JSON response
  • Register a shutdown handler that returns any remaining fatal as a JSON error, so if anything else ever fails you'll see the actual message and line number instead of a generic 500
  • Bail with a clear message if WP_Filesystem() can't initialize

Install

Download and install the attached wp-ez-plugin-deploy-1.8.4.zip.