You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Provide a more specific error message for WordPress core file errors
1997
-
// before WP-CLI's generic shutdown handler runs
1998
-
$message = sprintf(
1999
-
"Failed to load WordPress files for %s.\n\nError: %s in %s on line %d\n\nThis error is in WordPress core files, not a plugin or theme.\nIt often indicates a missing PHP extension (like mysqli) or corrupted WordPress installation.\n\nPlease check that all required PHP extensions are installed and that your WordPress installation is complete.",
2000
-
$context,
2001
-
$error['message'],
2002
-
$error['file'],
2003
-
$error['line']
2004
-
);
2005
-
2006
-
// Output directly and exit to avoid WP-CLI's generic plugin/theme suggestion
2007
-
fwrite( STDERR, "Error: {$message}\n" );
2008
-
exit( 1 );
2009
-
}
2010
-
}
2011
-
};
2012
-
2013
-
register_shutdown_function( $shutdown_handler );
2014
-
2015
1971
// phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingVariable -- Path comes from WordPress itself.
2016
1972
require_once$upgrade_file;
2017
-
2018
-
// Mark as completed to prevent the shutdown handler from executing on unrelated errors.
0 commit comments