Skip to main content

Filter: gk/gravitymigrate/import/install-error-handlers

Filters whether import() installs its own PHP error/exception handlers below. They route every notice into CoreHelpers::process_return(), which emits JSON and calls die() -- fine for a browser AJAX request, fatal anywhere else: under WP_CLI, wp would die mid-migration with JSON on stdout and a success exit code, and in a background scheduler task a single stray notice would escape the task's try/catch as an uncaught exception. Non-browser drivers scope this false around each step.

Parameters

NameTypeDescription
$install_handlersboolWhether to install the handlers. Default: true, except under WP_CLI.

Since

  • %ver%: %ver%

Source

Defined in src/Import.php at line 2547