Skip to content

PHP fatal undefined constant #975

Open
@kkmuffme

Description

@kkmuffme

downloaded from https://wordpress.org/plugins/plugin-check/ v1.5.0

Doesn't work due to undefined constant

wp plugin check some-plugin --require=wp-content/plugins/plugin-check/cli.php

Undefined constant "WordPress\Plugin_Check\Checker\Checks\WP_PLUGIN_CHECK_PLUGIN_DIR_PATH"
in /path/to/test/wp-content/plugins/plugin-check/includes/Checker/Checks/Abstract_PHP_CodeSniffer_Check.php on line 72

#0 /path/to/test/wp-content/plugins/plugin-check/includes/Checker/Checks.php (80): WordPress/Plugin_Check/Checker/Checks/Abstract_PHP_CodeSniffer_Check->run( $result = WordPress/Plugin_Check/Checker/Check_Result Object )
#1 /path/to/test/wp-content/plugins/plugin-check/includes/Checker/Checks.php (45): WordPress/Plugin_Check/Checker/Checks->run_check_with_result( $check = WordPress/Plugin_Check/Checker/Checks/General/I18n_Usage_Check Object, $result = WordPress/Plugin_Check/Checker/Check_Result Object )
#2 [callback of next frame] (-1): WordPress/Plugin_Check/Checker/Checks->WordPress/Plugin_Check/Checker\{closure}( WordPress/Plugin_Check/Checker/Checks/General/I18n_Usage_Check Object, 'i18n_usage' )
#3 /path/to/test/wp-content/plugins/plugin-check/includes/Checker/Checks.php (42): array_walk( &$array = 
#4 /path/to/test/wp-content/plugins/plugin-check/includes/Checker/Abstract_Check_Runner.php (374): WordPress/Plugin_Check/Checker/Checks->run_checks( $context = WordPress/Plugin_Check/Checker/Check_Context Object, $checks = 
#5 /path/to/test/wp-content/plugins/plugin-check/includes/CLI/Plugin_Check_Command.php (221): WordPress/Plugin_Check/Checker/Abstract_Check_Runner->run()
#6 [callback of next frame] (-1): WordPress/Plugin_Check/CLI/Plugin_Check_Command->check( $args = Array( [0] => some-plugin), $assoc_args = Array( [format] => table) )
#7 phar:///usr/bin/wp-dev/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php (100): call_user_func( $callback = Array( [0] => WordPress/Plugin_Check/CLI/Plugin_Check_Command Object, [1] => check), ...$args = Array( [0] => some-plugin), Array( [format] => table) )
#8 [callback of next frame] (-1): WP_CLI/Dispatcher/CommandFactory::WP_CLI/Dispatcher\{closure}( Array( [0] => some-plugin), Array( [format] => table) )
#9 phar:///usr/bin/wp-dev/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php (497): call_user_func( $callback = Closure Object, ...$args = Array( [0] => some-plugin), Array( [format] => table) )
#10 phar:///usr/bin/wp-dev/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php (441): WP_CLI/Dispatcher/Subcommand->invoke( $args = Array( [0] => some-plugin), $assoc_args = Array( [format] => table), $extra_args = Array() )
#11 phar:///usr/bin/wp-dev/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php (464): WP_CLI/Runner->run_command( $args = Array( [0] => plugin, [1] => check, [2] => some-plugin), $assoc_args = Array() )
#12 phar:///usr/bin/wp-dev/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php (1296): WP_CLI/Runner->run_command_and_exit()
#13 phar:///usr/bin/wp-dev/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php (28): WP_CLI/Runner->start()
#14 phar:///usr/bin/wp-dev/vendor/wp-cli/wp-cli/php/bootstrap.php (83): WP_CLI/Bootstrap/LaunchRunner->process( $state = WP_CLI/Bootstrap/BootstrapState Object )
#15 phar:///usr/bin/wp-dev/vendor/wp-cli/wp-cli/php/wp-cli.php (32): WP_CLI/bootstrap()
#16 phar:///usr/bin/wp-dev/php/boot-phar.php (20): include( 'phar:///usr/bin/wp-dev/vendor/wp-cli/wp-cli/php/wp-cli.php' )
#17 /usr/bin/wp-dev (4): include( 'phar:///usr/bin/wp-dev/php/boot-phar.php' )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions