← All changes
|
app/modules/import-export-customization/wp-cli.php
+3
-3
4.0.7
→
3.32.0-dev2
View file →
| @@ -57,9 +57,9 @@ | ||
| 57 | 57 | $import_export_module = Plugin::$instance->app->get_component( 'import-export' ); |
| 58 | 58 | $result = $import_export_module->export_kit( $export_settings ); |
| 59 | 59 | |
| 60 | 60 | rename( $result['file_name'], $args[0] ); |
| 61 | - } catch ( \Error | \Exception $error ) { | |
| 61 | + } catch ( \Error $error ) { | |
| 62 | 62 | \WP_CLI::error( $error->getMessage() ); |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | \WP_CLI::success( 'Kit exported successfully.' ); |
| @@ -184,9 +184,9 @@ | ||
| 184 | 184 | Plugin::$instance->uploads_manager->remove_file_or_dir( dirname( $zip_path ) ); |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | \WP_CLI::success( 'Kit imported successfully' ); |
| 188 | - } catch ( \Error | \Exception $error ) { | |
| 188 | + } catch ( \Error $error ) { | |
| 189 | 189 | Plugin::$instance->logger->get_logger()->error( $error->getMessage(), [ |
| 190 | 190 | 'meta' => [ |
| 191 | 191 | 'trace' => $error->getTraceAsString(), |
| 192 | 192 | ], |
| @@ -214,9 +214,9 @@ | ||
| 214 | 214 | */ |
| 215 | 215 | $import_export_module = Plugin::$instance->app->get_component( 'import-export' ); |
| 216 | 216 | $import_export_module->revert_last_imported_kit(); |
| 217 | 217 | |
| 218 | - } catch ( \Error | \Exception $error ) { | |
| 218 | + } catch ( \Error $error ) { | |
| 219 | 219 | \WP_CLI::error( $error->getMessage() ); |
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | \WP_CLI::success( 'Kit reverted successfully.' ); |